Python3 modul and cli tool to controll the Cleware traffic light
Project description
cleware-traffic-light
cleware-traffic-light an easy to use CLI tool written in Python3 to control the cleware USB traffic light. It supports multiple traffic light control and the usage as a module in your own Python application.
Usage
Module
from cleware-traffic-light import ClewareTrafficLight, Color, State
ClewareTrafficLight().red_on()
ClewareTrafficLight().yellow_off()
# with address for specific light
ClewareTrafficLight(21).green_on()
CLI
ctl --red on
ctl -r on
ctl --red on --green off
ctl --red off --green on --address 19
Installation
use pip to install cleware-traffic-light
pip3 install cleware-traffic-light
Help
usage: ctl [-h] [-r {on,off}] [-y {on,off}] [-g {on,off}]
[-a ADDRESS]
Turns the led of the cleware traffic light on or off
optional arguments:
-h, --help show this help message and exit
-r {on,off}, --red {on,off}
Controlls the red led
-y {on,off}, --yellow {on,off}
Controlls the yellow led
-g {on,off}, --green {on,off}
Controlls the green led
-a ADDRESS, --address ADDRESS
Specifies which traffic light should be used
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for cleware-traffic-light-1.0.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5f79873dbc1b2328ef5a1eaca38855f31b93d3e4aa7a6cb9e7c28930351195b6 |
|
MD5 | 83fad7309e4e3ec1f03fd63d75377201 |
|
BLAKE2b-256 | 975c269c98e8a549fa058de60c132338bad6fe34f9e6a8b2989c32b423e8db38 |
Close
Hashes for cleware_traffic_light-1.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9c14906e9ff949bcdbdd6e3aaf901515c4b6af19b82aeb7fc1b7ba07dfe1b420 |
|
MD5 | 5f98e3f362d2e05b361bf03bdfaf3751 |
|
BLAKE2b-256 | d727f74000191c8bb8a15b33dc6b9cab1a2400766b4d6e9c275c0ba1fa2b5e9e |