over the support tube.
Wiring the NeoPixel rings
neatly was somewhat difficult to
do. Four wires must be soldered
onto the little pads of the
NeoPixel rings. Each ring has a
data input pad (DI), a 5V pad, a
GND pad, and a data out (DO) pad. The DO pad of a
lower ring must connect to the DI pad of the upper ring,
and the 5V and GND connections are paralleled all the
way up the tree. The DO of the eight NeoPixel rings is
wired to the DI pad of the single NeoPixel LED glued to
the tree’s star. There is no connection from the single
NeoPixel LED’s DO pad. Care must be taken when
soldering these connections because it’s very easy to lift
these pads if too much heat is applied.
The software for the NeoPixel LED tree was
developed using the Arduino IDE (integrated development
environment). I used version 1.8.0 for Mac OS, but you
should be able to use the Arduino IDE on Windows as
well. See my previous articles in Nuts & Volts or the
Resources section here for how to set up the Arduino IDE
on your computer for targeting ESP8266 type devices.
To use the OTA feature of the Arduino IDE, you must
allow the IDE to accept remote connections. How this is
accomplished varies depending on the computer platform
you are running on, but usually involves a change to your
computer’s firewall settings. Google “Enabling Arduino
OTA <your platform>” to get the instructions appropriate
for your computer.
The NeoPixel LED tree software is available at the
article link. The file is called
Lindley_ESP8266NeoPixel Tree.zip. To use this software,
unzip the file and copy/move the ESP8266NeoPixel Tree
directory into your computer’s Arduino directory. The zip
file also contains the versions of the libraries I used during
program development. It’s important to use these versions
as different ones may not function correctly. These library
zip files should be unzipped and then moved into your
Arduino/Libraries directory for use. It is best to install new
libraries before the Arduino IDE is started.
Whereas the electronics for this NeoPixel LED tree
borders on the trivial, the software/firmware for the tree is
a bit more involved. The files which make up the program
are described in Table 1. In addition to the files in Table 1,
the Arduino libraries that are required are listed in Table 2.
Once you have the code and libraries in place, you
must connect the NodeMCU device in your tree to your
computer using a USB cable. Next, select the NodeMCU
1.0 board type from the Arduino IDE and the port that is
used to connect to your NodeMCU device. Once that is
completed, you can compile the code. If it’s error-free,
you can upload the code to your tree.
Once this initial upload is successful, you can
disconnect the USB cable and do any further updates
Before you can remotely control the NeoPixel LED
November 2017 21
■ FIGURE 10. Assembly detail close-up. Heat shrink
tubing used to hide spacers and wiring between
ESP8266NeoPixelTree.ino The main program file that drives the NeoPixel LED tree.
index.html.h Miscellaneous HTML snippets that support the web UI.
Library Function Source
ArduinoOTA Allows the NeoPixel LED tree code to be remotely updated after the initial upload. Provided with the ESP8266/Arduino platform code.
WiFiManager Allows the NeoPixel LED tree to change Wi-Fi credentials without having to make a code change. https://github.com/tzapu/WiFiManager
WS2812FX A NeoPixel LED special effects library for the ESP8266. A modified version of this library is included in the article download.