Skip to main content

WS2812B - Getting started

Arduino library

To install the Arduino library, you can use the Arduino library manager or download it from the GitHub repository:

Smart LEDs Arduino library

Smart Leds Arduino library by Soldered

ℹ️

First time Arduino user? For a detailed tutorial on how to get started with Arduino, see this section of our docs:

Getting started with Arduino

A full, comprehensive tutorial on how to fully set up and upload code for the first time on an Arduino board, from scratch!


Connections

Below is an example connection diagram for Dasduino CONNECTPLUS. These pins will be used in the examples throughout this documentation.

Dasduino CONNECTSmart LED WS2812B
VCCVCC
GNDGND
IO2 (any digital pin)DIN
wow
ℹ️
The DOUT pin on a WS2812B LED strip is used to pass the data signal to the next LED or another strip in a daisy-chain configuration.

External Power Supply

Below is the wiring setup for connecting an Arduino with an external 5V power supply to a WS2812B LED strip.

ComponentConnection PointNotes
WS2812B VCC5V output of external power supplyEnsure the power supply provides sufficient current for the LED strip.
WS2812B GNDGND of external power supplyMust be connected to create a common ground.
WS2812B DINIO2 (or any digital pin) on ArduinoData signal should be at 5V for proper operation.
Arduino 5V5V from external power supplyUse 5V if powering directly.
Arduino GNDGND of external power supplyEnsures a common reference for signal transmission.
ℹ️
For stability, use a 1000µF capacitor across the power and ground of the LED strip and a 330Ω resistor in series with the data line.