How to use a Neopixel strip
What is Neopixel?
Neopixel is a name given by Adafruit. Neopixel is addressable LEDs, meaning that they can be programmed individually. With the library created by Adafruit, you can easily program the Neopixel strip for your project. They come in different sizes and shapes and you can shorten or lengthen them flexibly. Once set up, they are very durable and efficient. They are commonly found in a lot house decorations or light installations.
- DIN to Pin6
- +5V to 5V
- GND to GND
Adafruit NeoPixel library will be used.
Download version 1.9.0 or below for a more stable performance.
We have a tutorial on how to install a library here.
Once the library is installed, you can use the example code for a test run.
Before uploading the code to Arduino, one change has to be made. You should be able to find the below lines in the code.
// How many NeoPixels are attached to the Arduino? #define LED_COUNT 60
You have to make sure how many pixels are attached to the Arduino. For example, if you are using this Neopixel stick with 8 pixels, then you have to change 60 to 8.
// How many NeoPixels are attached to the Arduino? #define LED_COUNT 8
You should see your Neopixel beamming up right now.