Updated README with CLI/Install information
This commit is contained in:
parent
35d161937e
commit
6c3c8ae24b
50
README.md
50
README.md
|
@ -1,10 +1,54 @@
|
||||||
pyluxafor
|
# pyluxafor
|
||||||
=========
|
|
||||||
|
|
||||||
Helper interface and CLI to interact with [luxafor](https://luxafor.com) products.
|
Helper interface and CLI to interact with [luxafor](https://luxafor.com) products.
|
||||||
|
|
||||||
|
## Install
|
||||||
|
|
||||||
## Usage
|
```
|
||||||
|
pip3 install pyluxafor
|
||||||
|
```
|
||||||
|
|
||||||
|
or
|
||||||
|
|
||||||
|
```
|
||||||
|
git clone git@github.com:fmartingr/pyluxafor.git
|
||||||
|
cd pyluxafor
|
||||||
|
python3 setup.py install
|
||||||
|
```
|
||||||
|
|
||||||
|
## Using the CLI
|
||||||
|
|
||||||
|
Pyluxafor provides the `luxa` command to interact with the USB led in the same way as the library
|
||||||
|
does, with some helper commands to convert colors between RGB/Hex.
|
||||||
|
|
||||||
|
```
|
||||||
|
# Converts between hexadecimal to decimal color notations
|
||||||
|
luxa hex2dec 00ff00
|
||||||
|
luxa dec2hex 255 255 0
|
||||||
|
|
||||||
|
# Set a flag with a fixed color
|
||||||
|
luxa set --led=all #ff0000
|
||||||
|
|
||||||
|
# Fade
|
||||||
|
luxa fade --led=all --speed=10 #00ff00
|
||||||
|
|
||||||
|
# Strobe
|
||||||
|
luxa strobe --led=front --speed=100 --repeat=10 #0000ff
|
||||||
|
|
||||||
|
# Wave
|
||||||
|
luxa wave --wave 3 --duration=100 --repeat=200 #ff0000
|
||||||
|
|
||||||
|
# Pattern
|
||||||
|
luxa pattern --repeat=2 2
|
||||||
|
|
||||||
|
# Turns off the luxafor
|
||||||
|
luxa off
|
||||||
|
|
||||||
|
# Using the conversion helpers in one command
|
||||||
|
luxa set $(luxa dec2hex 255 0 0)
|
||||||
|
```
|
||||||
|
|
||||||
|
## Using as a library
|
||||||
|
|
||||||
``` python
|
``` python
|
||||||
from luxafor import luxafor
|
from luxafor import luxafor
|
||||||
|
|
Loading…
Reference in New Issue