Peripherals for the ESP8266 - Light Strip Vivek Vidyasagaran
Connecting light strips onto the ESP is fairly straightforward. However, there are a few things you have to watch out for while doing so. The biggest thing is the type of light strip you are using. There are a number of different aspects by which light strips differ. They can run on 3V, 5V or 12V and may be single color or have red, green and blue LEDs in one unit. Also, they may be individually addressable or not.
In our case, we got the Adafruit Neopixel lights. These look great! They have a pretty high intensity when fully lit, support thousands of colors (they have R,G and B in the same unit) and are individually addressable.
The way they work is that when one of the LEDs receive a series of colors, it changes to the first color and then passes the rest of the data through it onto the next light. So all you need to do to make the first 30 LEDs change to, say, blue is to send the code for blue 30 times. Each LED will take one of those codes and send the rest onward. The 30th LED takes the last code and has nothing left to pass on. Although the idea is straightforward, actually communicating with this strip is slightly complicated. It requires precise timing. Thankfully, Adafruit maintains a great library that takes care of all of these things for you. Their page has a lot of great information on how to get this up and running. They have awesome examples that get you up and running immediately. Our suggestion is to get an example code running (the strandtest example is great) and then just modifying the code to get it to do what you want.