RGB LED strip / ring WS2812 with TinkerPie
NeoPixel strips and rings. Power long strips from a separate 5 V supply.
| Type | Displays and lights |
|---|---|
| Connect to | DIN on any accessory pin, 5 V + GND |
| Gives | up to 60 colour LEDs |
| Simulator | Yes: a control appears under the simulated board |
How it works
Each WS2812 LED (often called a NeoPixel) has its own tiny control chip. The board sends colour data down one wire; each LED takes its colour and passes the rest along the chain, so one pin controls a whole strip or ring.
How to wire it
OLED and LCD go into a SENSOR port (I2C). The 4-digit display and LED strips use one or two signal pins.
Code
In blocks: Accessories category in TinkerPie Studio. As code:
// JavaScript
strip.begin(Pin.P10, 30)
strip.rainbow(0)
strip.setPixel(0, Colors.Red)
// Arduino C++
strip::begin(Pin::P10, 30)
strip::rainbow(0)
strip::setPixel(0, Colors::Red) Good to know
- Each LED can use up to about 60 mA at full white, so 60 LEDs can need over 3 A.
- Power long strips from a separate 5 V supply and join the grounds.
- Lower brightness saves power and is kinder to eyes.
Projects with the RGB LED strip / ring WS2812
Similar modules
More projects to try
Questions
Can I try the RGB LED strip / ring WS2812 without buying one?
Yes. In TinkerPie Studio the simulator shows a control for it under the board, so you can test your program before you build it.
Why do my LEDs flicker or show wrong colours?
Usually the power supply is too weak or the grounds are not joined. Use a separate 5 V supply, join GND to the board and keep the data wire short.