changed documentation for ws2812 module, which only works for pin GPIO2 at the moment (#1235)
This commit is contained in:
parent
61c2b4dfe3
commit
3f418f995c
|
@ -11,7 +11,7 @@ Send GRB data in 8 bits to a WS2812 chain.
|
|||
`ws2812.writegrb(pin, string)`
|
||||
|
||||
#### 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.
|
||||
It should be composed from a GRB triplet per element.
|
||||
- `G1` the first pixel's Green channel (0-255)
|
||||
|
@ -28,7 +28,7 @@ g = 0
|
|||
r = 255
|
||||
b = 0
|
||||
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()
|
||||
|
@ -38,7 +38,7 @@ Send GRB data in 8bits to a WS2812 chain.
|
|||
`ws2812.writergb(pin, string)`
|
||||
|
||||
#### 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.
|
||||
It should be composed from an RGB triplet per element.
|
||||
- `R1` the first pixel's Red channel (0-255)
|
||||
|
|
Loading…
Reference in New Issue