Introduction: How to Use NeoPixel / WS2812 16-bit Ring Using Arduino Nano
WS2812 is an LED Module which consists of RGB LEDs and its control chip integrated in a 5050 component package.
Features and Benefits:
- Control circuit and RGB chip are integrated in a package of 5050 components.
- Built-in signal reshaping circuit.
- Built-in electric reset circuit and power lost reset circuit.
- Cascading port transmission signal by single line.
Send data at speeds of 800Kbps.
See the datasheet for more info WS2812
Step 1: Required Components
The components you need for this tutorial :
- 16 Bit WS2812 RGB LED.
- Arduino Nano V.3
- Jumper wire
- Mini USB
Required Library :
To add a library to Arduino, see this article "How to Add an External Library to Arduino"
Step 2: Connect the RGB Ring to Arduino
Follow the instructions below to connect WS2812 to Arduino Nano :
WS2812 to Arduino
IN ==> D6
VCC ==> +5V
GND ==> GND
Step 3: Programing
Open Arduino IDE
Click File > Examples > Adafruit NeoPixel > strandtest
You must change some values from this sketch,
What must be changed is as follows:
- Pin used
#define LED_PIN 6
- Number of LEDs
#define LED_COUNT 16
- Set Brightness
strip.setBrightness(10);
Set the values above according to your needs
After that, upload the sketch to Arduino.
Step 4: Results
You can see the results on the video