node-piglow-cli
node-piglow-cli provides a cli interface for the piglow a led board for the raspberry pi.
Installation
npm install -g piglow-cli
For more details see node-piglow.
Invocation
$ piglow --leg_0 100 //lights up the 8 LEDs of the first piglow leg
Each parameter can be specified individually as a command line parameter. See the section Adressing for a detailed overview.
When the parameter mocked
is assigned, the parameters will not be passed to the piglow board but to a mocking backend. This is useful in a testing environment.
$ piglow --leg_1 100 --mocked piglowConfiguration:leg0 leg1 leg2ring0 0 100 0ring1 0 100 0ring2 0 100 0ring3 0 100 0ring4 0 100 0ring5 0 100 0
Example
piglow --mocked --ring_0 100 --leg_1 --l_2_5 10 piglowConfiguration:leg0 leg1 leg2ring0 100 255 100ring1 0 255 0ring2 0 255 0ring3 0 255 0ring4 0 255 0ring5 0 255 10
The shorthand version can be used on the command line as well:
$ piglow --all --mocked piglowConfiguration:leg0 leg1 leg2ring0 255 255 255ring1 255 255 255ring2 255 255 255ring3 255 255 255ring4 255 255 255ring5 255 255 255