Hi everybody,

If you're like me, you've been looking around the internet for a good tutorial on using the ESP8266 with neopixel LEDs (AKA the WS2812 or WS2812b), programmed via the Arduino IDE. I haven't found it all in one place, in English, but it turns out it's pretty easy now - much better than a few months ago. First, props to sabas1080 for his instructable, which does a nice job of this in Spanish. I'm documenting it here in English in case this helps others.

This is a basic breadboard demonstration. It's not meant to be a "final product" but consolidates instructions for this basic setup. If you haven't used the ESP8266 yet, it's an awesome little wifi board that you can get for a few bucks. Even the fancy version is only $10.

Note that this DOES NOT require a separate Arduino board, it's running the neopixels directly from the ESP8266 and just programming it with the Arduino IDE. And thanks to the hard work of many people it's now very easy!

Come see...

Step 1: Parts and Assembly

Parts you'll need:

  1. an ESP8266, I used Adafruit'sHuzzah breakout, http://www.adafruit.com/product/2471
  2. 3.7v LiPo battery such as https://www.adafruit.com/products/1317
  3. FTDI programmer such as http://www.adafruit.com/product/284 or USB-to-serial cable
  4. small switch such as https://www.adafruit.com/products/805
  5. Neopixels (aka WS2812 LEDs) such as https://www.adafruit.com/products/1463
  6. Capacitor to protect your neopixels - I have a 1000 uF here.
  7. ~470 ohm resistor
  8. Breadboard
  9. Wire

Note: using the Huzzah breakout board makes things easier because it has buttons built in for reset and bootloader mode. if you're using a bare ESP8266 board, you'll want a couple additional buttons to use for reset and putting the ESP8266 in the bootloader mode (to upload your code to it).


Assemble as shown in the diagram above. The capacitor and resistor help protect your neopixels. I'm using a neopixel ring because that's what I happen to be working on, but you can test with a strip or a single pixel or whatever you have. If you are using the Adafruit Huzzah breakout, solder it as shown on their nice page here: https://learn.adafruit.com/adafruit-huzzah-esp8266-breakout/using-arduino-ide using your breadboard.

You'll need the FTDI cable or USB for programming. After the programming is finished, you can remove it. Speaking of which, let's program this thing.

<p>Grat project! What about battery life? How long it can last on batteries?</p>
<p>Good job Sir its very Cool project ,very interesting!! i'll make it!!!</p>
Cool project. Thanks for putting forth the effort to help people learn. One question though, since your using the ESP8266, it seems as though the article would include info on how to actually control the pixels via wifi. Am I missing something?
<p>Working on it. But I seem to be running out of space. Trying to consolidate code to get it to fit. Look into the ESP8266 example sketches(ive started with captive portal for a direct connection when no wifi router is around). if/then/else; ive programmed in based on the indexOf url (ex /rainbow/ or /red/ or /redc/ for red chasing ect) and buttons to pass it to the url. Code is sloppy right now, but hopefully I'll have something soon.</p>
Glad you're doing that. Thanks for pitching in! <br><br>It wasn't my intent with this one, since there many different ways you can do this depending on what you want and I had other plans for the control and just needed to figure out the ESP8266 interface w/ the neopixels. <br><br>I'm glad others are contributing, and I'd be glad to update this instructable to point to another that demonstrates how to control via wifi.
<p>...and started<br>https://github.com/TheExpertNoob/ESP8266-Wifi-NeoPixel/blob/master/README.md</p>
<p>Thanks for the tutorial. Very well written, great to have everything in one place.</p>
<p>Thanks, glad this helped!</p>
<p>I thought nexopixels require 5V power and 5V signal</p>
Thanks for checking: they can actually be powered by lower voltages. Too low and you might lose color fidelity. See here for more info: https://learn.adafruit.com/adafruit-neopixel-uberguide/power<br><br>
<p></p><p>Why I can't finish, gpio output is Unlike the arduino</p>
<p>Hi finalvalue,</p><p>I'm sorry that you're having trouble. Can you be more specific about exactly what problem you're having?</p><p>Thanks!</p>
<p>I tested, control individual leds by Blink can be normal operation!But, with 12 for the lamp ring cannot normal control, lamp ring no response</p>
<p>Double-check that you are using the same pin and matching pin assignment in the software. Also double check that you have enough power for the LEDs. you might want to add a large-ish capacitor (like 1000 uF) across the + and - power rails, as both the ESP8266 and the LEDs can have large and spikey current draw.</p>

About This Instructable




More by Rocktakon:Internet of Toots (IoT): A Social Whoopee Cushion Relieve Itching From Poison Oak ESP8266 controlling WS2812 Neopixel LEDs using Arduino IDE - A Tutorial 
Add instructable to: