changed documentation for ws2812 module, which only works for pin GPIO2 at the moment (#1235)

This commit is contained in:
Falk Kühnel 2016-04-11 22:12:02 +02:00 committed by Marcel Stör
parent 61c2b4dfe3
commit 3f418f995c
1 changed files with 3 additions and 3 deletions

View File

@ -11,7 +11,7 @@ Send GRB data in 8 bits to a WS2812 chain.
`ws2812.writegrb(pin, string)` `ws2812.writegrb(pin, string)`
#### Parameters #### Parameters
- `pin` any GPIO pin 0, 1, 2, ... - `pin` is ignored. Only works with GPIO2.
- `string` payload to be sent to one or more WS2812 LEDs. - `string` payload to be sent to one or more WS2812 LEDs.
It should be composed from a GRB triplet per element. It should be composed from a GRB triplet per element.
- `G1` the first pixel's Green channel (0-255) - `G1` the first pixel's Green channel (0-255)
@ -28,7 +28,7 @@ g = 0
r = 255 r = 255
b = 0 b = 0
leds_grb = string.char(g,r,b, g,r,b) leds_grb = string.char(g,r,b, g,r,b)
ws2812.write(2, leds_grb) -- turn two WS2812Bs to red, connected to pin 2 ws2812.write(2, leds_grb) -- turn two WS2812Bs to red, connected to pin GPIO2
``` ```
## ws2812.writergb() ## ws2812.writergb()
@ -38,7 +38,7 @@ Send GRB data in 8bits to a WS2812 chain.
`ws2812.writergb(pin, string)` `ws2812.writergb(pin, string)`
#### Parameters #### Parameters
- `pin` any GPIO pin 0, 1, 2, ... - `pin` is ignored. Only works with GPIO2.
- `string` payload to be sent to one or more WS2812 LEDs. - `string` payload to be sent to one or more WS2812 LEDs.
It should be composed from an RGB triplet per element. It should be composed from an RGB triplet per element.
- `R1` the first pixel's Red channel (0-255) - `R1` the first pixel's Red channel (0-255)