Skip to content

Latest commit

 

History

History
68 lines (50 loc) · 1.77 KB

README.md

File metadata and controls

68 lines (50 loc) · 1.77 KB

node-piglow-cli Build Status

NPM

NPM

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    leg2
ring0  0       100     0
ring1  0       100     0
ring2  0       100     0
ring3  0       100     0
ring4  0       100     0
ring5  0       100     0

Example

piglow --mocked --ring_0 100 --leg_1 --l_2_5 10

piglowConfiguration:
leg0    leg1    leg2
ring0  100     255     100
ring1  0       255     0
ring2  0       255     0
ring3  0       255     0
ring4  0       255     0
ring5  0       255     10

The shorthand version can be used on the command line as well:

$ piglow --all --mocked

piglowConfiguration:
leg0    leg1    leg2
ring0  255     255     255
ring1  255     255     255
ring2  255     255     255
ring3  255     255     255
ring4  255     255     255
ring5  255     255     255