LED Protocol Commands
Overview
- Bus: WS2812 single wire, APA102 two wire
- Connections: one or two pins (SDO, SCL), and ground
- Output type: 1.65-5volts
- Maximum voltage: 5volts
WS2812/SK6812 and APA102/SK9822 are common RGB LEDs with a one and two wire interface.
LEDs are power hungry, up to 60mA each at full brightness. The programmable power supply is rated for 400mA maximum. The LEDs will need an external power supply when driving more than a few in a strip.
Configuration options
Bus Pirate [/dev/ttyS0]
LED type
1. WS2812/SK6812/'NeoPixel' (single wire interface)*
2. APA102/SK9822 (clock and data interface)
3. Onboard LEDs (16 SK6812s)
x. Exit
Type (1) >
Number of LEDs in the strip
1 to 10000
x. Exit
LEDs (1*) >
Mode: LED
LED-(WS2812)>
1. WS2812/SK6812/'NeoPixel' (single wire interface)*
2. APA102/SK9822 (clock and data interface)
3. Onboard LEDs (16 SK6812s)
x. Exit
Type (1) >
Number of LEDs in the strip
1 to 10000
x. Exit
LEDs (1*) >
Mode: LED
LED-(WS2812)>
Syntax
Command | Description |
---|---|
[ or { | Reset (APA102), Start Frame (WS2812) |
] or } | End Frame (WS2812) |
0b | Write this binary value. Format is 0b00000000 for a byte, but partial bytes are also fine: 0b1001. |
0x | Write this HEX value. Format is 0x01. Partial bytes are fine: 0xA. A-F can be lower-case or capital letters. |
0-255 | Write this decimal value. Any number not preceded by 0x or 0b is interpreted as a decimal value. |
space | Value delimiter. Use a space to separate numbers. No delimiter is required between non-number values: {0xa6 0 0 16 5 0b111 0xaF rrrr}. |
(#) | Run macro, (0) for macro list. |
Macro
Number | Description |
---|---|
0 | Macro menu |
Connections
WS2812/SK6812/'NeoPixel'
Bus Pirate | Direction | Circuit | Description |
---|---|---|---|
SDO | → | DIN | Serial Data Out |
GND | ⏚ | GND | Signal Ground |
APA102/SK9822
Bus Pirate | Direction | Circuit | Description |
---|---|---|---|
SDO | → | SDI | Serial Data Out |
SCL | → | CKI | Serial Clock |
GND | ⏚ | GND | Signal Ground |