Projects • Research & Design Hub

Lighting a Miniature Holiday Village 

FIGURE 1 This typical village structure is internally lighted with a standard E12 6W (candelabra base) incandescent light bulb. The bulb is replaceable via a 1¼" hole in the bottom or back of the building.
Written by Jeff Bachiochi

Part 1: Using DotStar RGB LEDs with an ESP8266 and WEMOS-D1 Mini

The Holiday season is behind us, but Jeff is already thinking about decorations for the next one. This month, he replaces the incandescent bulbs in a tiny village with DotStar RGB LEDs, using an ESP8266 and a WEMOS-D1 mini microprocessor development board. The lights are programmed individually to display or change color at certain times of day and night, to simulate when actual activities might be occurring in real buildings. 

  • What’s a fun project with an ESP8266?
  • What I can build using DotStar RGB LEDs?
  • What are some design solutions for mini holiday village lighting projects?
  • DotStar RGB LEDs
  • ESP8266
  • WEMOS-D1 Mini

  • Espressif Systems | www.espressif.com
  • Wemos | www.wemos.cc

Crystal Lake has finally frozen over. I expect it to melt again this week, though, as the 10-day forecast calls for a warming trend. The Christmas decorations are finding their way back into the attic until the next Advent Season arrives later this year. Although the new year has just begun, I am already thinking about spring and leaving the frosty air behind, even if it is months away.

Every Christmas season, all the flat surfaces in my house seem to come alive with tiny villages popping up all over. Some of you might know what I mean if I say, ‘”Department 56.” Maybe your spouse or parent knows that since 1976, the Department 56 company has released hand-painted, ceramic buildings replicating an old-fashioned village decorated for the holidays. These are often used with HO trains to develop realistic layouts.

Each house is lighted with a 120V, 6W, E12 (candelabra base) incandescent bulb. Figure 1 shows a typical building and the bulb that enters through a 1¼” hole in the back or bottom of the building. When you have a group of buildings set up in a village format, the wiring gets a bit nasty (Figure 2). Luckily, the total current here is small, and safety isn’t an issue. But I get constant complaints about not having a sufficient number of outlets for these temporary displays. What’s a guy to do?

FIGURE 1
This typical village structure is internally lighted with a standard E12 6W (candelabra base) incandescent light bulb. The bulb is replaceable via a 1¼" hole in the bottom or back of the building.
FIGURE 1
This typical village structure is internally lighted with a standard E12 6W (candelabra base) incandescent light bulb. The bulb is replaceable via a 1¼” hole in the bottom or back of the building.
FIGURE 2
With an AC cord from each lighted building, the poor wall outlet is often overloaded. The 6W/bulb does not add up to much current, so this isn't a safety hazard, but it does create clutter.
FIGURE 2
With an AC cord from each lighted building, the poor wall outlet is often overloaded. The 6W/bulb does not add up to much current, so this isn’t a safety hazard, but it does create clutter.
LOW-VOLTAGE LIGHTING

Some LED lights are available for these buildings. They are meant to replace the incandescent bulbs and run off a battery pack. That’s fine for a single unit. With a whole town you’d need a never-ending supply of AA batteries to keep them all burning bright. Not gonna happen. 

In this project, I’m going to attempt to solve this issue and make each house programmable on its own. I’ll replace each incandescent bulb with thr ee DotStar RGB LEDs. The controller will be an ESP8266 microprocessor. It will connect to the Internet to get the time of day. A number of commands are programmed to turn any LED ON and OFF by time. Each command also contains the LED’s color and the time it takes to change states (or colors) up to 25s.

The ides is to turn LEDs ON and OFF at various times of the day/night to simulate actual activity going on inside. This might simulate daytime lights in an office, lights that come on as dusk settles in, or someone using the bathroom at night. A normal household might have only white lights, but I’ve seen colored lighting being used in my neighborhood, especially around the holidays. My teenaged neighbors have strings of colored lights decorating their rooms. With three LEDs, you have seven combinations of directional white lighting, not to mention different intensity levels.

ESP8266

I’ve chosen to use a WEMOS D1 mini for this project. It is a miniature wireless 802.11 (Wi-Fi) microcontroller development board that is 1 x 1.25” in size and contains a micro-USB jack for programming (and power). To run the DotStar LEDs requires 5V and ground, plus two output bits. For prototyping, I’ll use a small piece of protoboard to wire up the LEDs and provide support for the PCB being held in the entry hole of the building.

I will modify the metal bracket that holds the 6W incandescent bulb to mount the prototype PCB, so everything fits into the building as normal. After removing the bracket and bulb, I removed the bulb and socket from the bracket. With a pair of pliers, I bent up one side of the bracket, so the prototype PCB could be epoxied onto it (Figure 3). Figure 4 shows the WEMOS board mounted to the prototyping board.

I have cut three DotStar LEDs from a 1m LED strip. These strips are available with 30, 60, or 144 LEDs per meter. You can use any of these for this project (Figure 5). These strips can be cut with a pair of scissors. If you don’t want to waste an LED, then you will want to include the solder pads that include DI (Data In), and cut off the pads on the opposite end, since the output doesn’t go anywhere. You might include pads at either end to make mounting more stable, or just leave the opposite end floating, as I have.

You can choose to use more LEDs, if you’d like, and may want to take into account the size of the building. If you do go with three LEDs, then pay attention to the direction of the LEDs when placed in the building, since they can be positioned to shine either up/front/down or left/front/right when plugged in the building’s rear. Or, when plugged into the bottom, they could shine back/top/front or left/top/right.

FIGURE 3
A clothespin comes in handy to hold the bracket and PCB in place while the epoxy hardens. The micro-USB cable will plug right through the socket hole.
FIGURE 3
A clothespin comes in handy to hold the bracket and PCB in place while the epoxy hardens. The micro-USB cable will plug right through the socket hole.
FIGURE 4
With four connections made to the WEMOS D1 mini board and a 3-LED DotStar LED strip attached to the 4-pin connector at the end of the prototyping board. this module can replace the standard incandescent bulb in any village building. Note that the LED strip in bent to 90° between each LED. This directs the three LEDs in different directions.
FIGURE 4
With four connections made to the WEMOS D1 mini board and a 3-LED DotStar LED strip attached to the 4-pin connector at the end of the prototyping board. this module can replace the standard incandescent bulb in any village building. Note that the LED strip in bent to 90° between each LED. This directs the three LEDs in different directions.
FIGURE 5
DotStart RGB LEDs are individually addressable, using a 2-wire SPI output (SCLK and MOSI). Power (5V) and ground are included on my 4-pin interface header. You can buy individual devices or pre-mounted on thin flexible strips. The strips are available with 144, 60, or, 30 LED devices/meter.
FIGURE 5
DotStart RGB LEDs are individually addressable, using a 2-wire SPI output (SCLK and MOSI). Power (5V) and ground are included on my 4-pin interface header. You can buy individual devices or pre-mounted on thin flexible strips. The strips are available with 144, 60, or, 30 LED devices/meter.
CODING

Code for this project is available on the Circuit Cellar Article Code and Files webpage. Let’s begin with code to operate the LEDs. DotStar LEDs use a 4-byte packet for each device, which means you must send a packet for each LED in the string. Each device has internal shift registers that can receive 4 bytes, shown in the block diagram (Figure 6). As each new packet is shifted in, the previous packet is shifted out. A data packet consists of a 5-bit brightness value with the 3 most significant bits set to 1, followed by three color values—Blue, Green, and Red—in that order. There are two special packets—a start packet (all 0 bits) and an end packet (all 1 bit). The start packet cannot be duplicated by any other packet; therefore, it is used as a sync for a new data stream. After the 32nd shift register bit receives 32 0 bits, it begins looking for a 1 on the next 32nd bit. This will latch data into holding registers, until there is a lapse in clocks after the last packet. The end packet can be duplicated by a maximum-brightness white packet, but it is necessary to get the data latched. 

FIGURE 6
This is a block diagram of each DotStar RGB LED device. Data and Clock In and Out are used to daisy chain devices. The data protocol asks for a 4-byte start frame, followed by a 4-byte frame of data for each device, and ending with a 4-byte end frame. So the minimum data for three LEDs is 32 bits x (1 + 3 + 1).
FIGURE 6
This is a block diagram of each DotStar RGB LED device. Data and Clock In and Out are used to daisy chain devices. The data protocol asks for a 4-byte start frame, followed by a 4-byte frame of data for each device, and ending with a 4-byte end frame. So the minimum data for three LEDs is 32 bits x (1 + 3 + 1).

Assuming you have sent a start packet and one data packet for each LED, followed by a end packet, all devices should now have data latched into their holding registers. This brightness data is used to set a PWM value for the LED current of each LED. The color values control separate PWMs of each LED. While the brightness is an overall control, each color can be adjusted anywhere between OFF and ON, where ON is a maximum based on the brightness setting. We will use the SPI peripheral to send out the LED packets.

DotStarArray[] is an array of 4-byte packets, with one for each LED. The code in Listing 1, defines those items we will use for this application. NUMPIXELS defines how many pixels are in the string of LEDs. The DotStarArray holds 4 bytes for each LED. I’ve predefined the brightness as maximum. The Color bytes hold values for each of the three colored LEDs inside each device. The DotStarLEDPointer will be used to indicate to which packet (LED device) we want to store data.

Now we can use the setup() function to start a serial port, initialize the DotStar communication (SPI port), and also, fill the array with 0x00 (black or off) color values. Finally, we increase the serial timeout to allow the user 10s to reply to a request for a value (Listing 2).

The main loop of this application has only four routines. As the user, you are asked via a serial terminal to answer a few questions. The first function, chooseAnLED(), prompts you for which of the three (in this case) LEDs you wish to control. The second function, chooseAColor(), prompts you for the color value of each devices LED. The third function, storeAtLED(DotStarLEDPointer), takes the users input and stores it into the proper elements of DotStarArray. And finally, updateDotStar() handles sending out packets of data to the DotStar string of LEDs (Listing 3).

LISTING 1
Code given here defines the items used in this application.

//--------------------------------------// start dotstar initialization//--------------------------------------#include <SPI.h>#define NUMPIXELS 3 // Number of LEDs in stripbyte Brightness = 0x1F;byte BlueColor;byte GreenColor;byte RedColor;byte DotStarArray[NUMPIXELS * 4];byte DotStarLEDPointer = 0;//--------------------------------------// end dotstar initialization//--------------------------------------
LISTING 2
The setup function starts a serial port, initializes the DotStar communication (SPI port, fills the array with all colors off values, and increases the serial timeout to allow the user 10s to reply to a request for a value.

//--------------------------------------// start setup()//--------------------------------------void setup(){  Serial.begin(115200);  Serial.println();  Serial.print(“Starting”);  for(int i = 0; i < 10; i++)  {    delay(500);    Serial.print(‘.’);  }  Serial.println();  Serial.println(signON);  //----------------  // start dotstar setup  //----------------  initializeDotStar();  //----------------  // end dotstar setup  //----------------  Serial.setTimeout(10000);}//--------------------------------------// end setup()//---------------------------------------
LISTING 3
Four routines in the main loop determine which LED is chosen, its color, stores the user input, and sends data packets to the string of LEDs.

//--------------------------------------// start loop()//--------------------------------------void loop(){  chooseAnLED();  chooseAColor();  storeAtLED(DotStarLEDPointer);  updateDotStar();}//--------------------------------------// end loop()//--------------------------------------

The updateDotStar() routine calls separate routines sendStartFrame(), sendDataFrame(), and sendEndFrame() to complete its task. The sendDataFrame() routine cycles through all three devices in the DotStarArray. Refer to Figure 7 to see how the colors are mixed to create other colors or shades. Be advised, your colors will vary, so play around with the values a bit. Some might even be impossible.

FIGURE 7 (above)
Note that the 3-byte R,G, and B codes on the left can be used to request a particular color. These values are sent out as the last 3 bytes of the 4-byte frame, but in B,G, R order. The first byte value is brightness = 0xE0 (off) – 0xFF (max).
FIGURE 7 (above)
Note that the 3-byte R,G, and B codes on the left can be used to request a particular color. These values are sent out as the last 3 bytes of the 4-byte frame, but in B,G, R order. The first byte value is brightness = 0xE0 (off) – 0xFF (max).
CODE FOR TIMING

You could stop here and hard code three colors you like, so that when the circuit is plugged in, it will set each of the LEDs to whatever colors you chose. But how drab is that? Let’s make this more animated by introducing time into the arena. Since the ESP8266 has built-in Wi-Fi, we can add some code to get the time of day from the National Time Protocol. The NTP Project conducts Research and Development in NTP, a protocol designed to synchronize the clocks of computers over a network to a common timebase. We can access it via our home network. So lets start by allowing this micro to connect to our home network.

The code given in Listing 4 will add all the Wi-Fi routines we’ll need for this project. The last two “includes” will handle finding your wireless network and contacting the time service to get the time of day. We need to establish more variables to handle the time. Also note the timeClient, which sets up the contact URL, the timezone for EST, and how often the time service will be contacted to check the time.

I have put all the Wi-Fi initialization into one routine that is called from the setup(), and is shown below. This handles connecting to your wireless network. If your wireless network has never been connected by this application, the manager creates a web configuration portal. Using you smartphone or computer, you can choose to connect to this device. It will be named ESP_xxxxxx (last 6 characters of your device’s MAC.) Once you’ve chosen this SSID in your “Wi-Fi networks available” list, the portal will pop up, and you can enter your wireless networks SSID and password. Then you will be connected to your wireless network, and the SSID and password will be saved for future reboots. Don’t forget to write down your device’s name, so you can refer to it in the future.

 //—————-

 // start wifi setup

 //—————-

 initializeWifi();

 //—————-

 // end wifi setup

 //—————-

We want to be able to act on the actual time of day. In the main loop(), we keep the variables up to date. Based on myMinute, we look for the minute to change, and when it does, we execute the processEvent() routine. Here’s where the rubber meets the road, or the animated action is triggered by the time (Listing 5).

LISTING 4
The code given here adds all the Wi-Fi routines for this project.

//--------------------------------------// start wifi initialization//--------------------------------------#include <ESP8266WiFi.h>#include <DNSServer.h>#include <ESP8266WebServer.h>#include <WiFiManager.h>         // https://github.com/tzapu/WiFiManager#include <NTPClient.h>// Set web server port number to 80WiFiServer server(80);// Variable to store the HTTP requestString header;const int myTimezone = -5;String myName;byte h;byte m;byte s;byte myHour;byte myMinute;byte mySecond;byte lastMinute = 0;byte myRed;byte myGreen;byte myBlue;WiFiClient client;WiFiUDP ntpUDP;NTPClient timeClient(ntpUDP,”pool.ntp.org”,60 * 60 * myTimezone , 60000);//--------------------------------------// end wifi initialization//--------------------------------------
LISTING 5
The processEvent routine is where the animated action is triggered by the time.

  // added to Loop()  timeClient.update();  if(timeClient.isTimeSet())  {    myHour= timeClient.getHours();    myMinute = timeClient.getMinutes();    mySecond = timeClient.getSeconds();  }  if(myMinute != lastMinute)  {    processEvent();    lastMinute = myMinute;  }  if(checkForFade())  {     processFade();  }  delay(100);
CODE FOR PROCESSING AN EVENT

As stated earlier, we will animate the individual LEDs to simulate lights going ON and OFF in the building. Each Command has nine elements: the ON time (Hour,Minute), OFF time (Hour,Minute), the LED position, the LED’s Red value, Green value , Blue value, and the fade time (Listing 6). There are, for this instance, 10 Commands positions available— 0-9. This was assigned via the constant COMMANDS = 10. The multidimensional array, array[], defines each element of each Command. The first Command in this array 18,00,23,00,0,0,255,0,100 means that LED0 will be Green at 6:00 p.m., since its Red LED set to 0 (OFF), its Green LED set to 255 (full ON), and its Blue LED set to 0 (OFF). It will be turned OFF at 11:00 p.m. The last value, 100, is the fade time in tenths of a second. I’ll discuss this further a little later.

First, let’s go over the processEvent() routine that will be checked at every change of myMinute (Listing 7). This routine will go through the 10 Commands in array[i] from the routine getArrayCommand(i), looking first for a match to the nextHourOn and nextMinuteOn elements of the Command, then for a match in the nextHourOff and nextMinuteOff elements of the Command. The variable ModeOn is used to keep track of whether a match is to turn an LED ON or OFF. Finally, we check the Command’s fade value. A fade value (nextDuration) of 0 means there is no fade, and the LED is just turned ON or OFF using the updateLED() routine. The durationArray[] keeps track of the present duration (fade) value. If the Command’s fade was >0, then we use an alternate routine, processDuration().

To just turn the RGB LED ON or OFF with no fading, the updateLED routine will set RedColor, BlueColor, and GreenColor depending on Boolean modeOn. These values will be stored into the DotStarArray[] elements for our particular RGB LED, by the routine storeAtLED(nextLED). Finally, the DotStarArray[] is sent out the SPI port to update the RGB LED string (Listing 8).

Code for the following is given in Listing 9. The processDuration(i) routine sets up the change in color value for each color when nextDuration is >0. This is based on the present values for BlueColor, GreenColor, and RedColor of each RGB LED located in the DotStarArray[]. The command values for what we want the RGB LED to be are nextRed, nextGreen, and nextBlue, for an ON time match, and 0, 0, and 0 for an OFF time match. The three arrays that hold the working color values, nextRedArray[], nextGreenArray[], and nextBlueArray[] are loaded from the DotStarArray[]. The three arrays that hold change color values, changeRedArray[], changeGreenArray[], and changeBlueArray[] are calculated. This change will be applied to the working color values after each 100ms. Therefore, the change for each color value will be:

(Value1 – Value2) / Value3

where Value 1 is “what value we want;” Value2 is “what value we have;” and Value 3 is “fade value (nextDuration).”

This finishes off the processEvent() routine. If any time matches were found and the fade value =0, then the appropriate change has been made to that RGB LED. If the fade value is >0, then we will let the main loop handle the fading (Listing 10). Referring back to the code added to loop() above, the checkforFade() routine is run each time through loop(). Back in the processEvent() routine, the durationArray[] value was set to the fade value of a time-matched Command, when it is >0. The checkforFade() routine looks at the durationArray[] value for each Command. If it finds any with a value >0, then it allows processFade() to be executed. This routine looks for those durationArray[] values that are >0 and executes the updateDuration() routine on each one (Listing 10).

The updateDuration() routine adjusts the nextRedArray[], nextGreenArray[], and nextBlueArray[] based on the present value plus the changeRedArray[], changeGreenArray[], changeBlueArray[]. These values update RedColor, GreenColor, and BlueColor and the storeAtLED(nextLED) routine updates DotStarArray[], so updateDotStar() can send data out the SPI port to update the RGB LED string. Finally, the durationArray[] value is decremented for the next checkforFade(). Fading from one color to another over a period of time allows colors to change gradually over a maximum of 25s, in 100ms increments.

LISTING 6
Code given here defines ten Commands and the nine elements in each Command.

//added to the initialization#define COMMANDS 10 // Number of Commands in array//H,M(on),H,M(off),LED,Red,Green,Blue,Fadebyte array[COMMANDS][9] = {  18,00,23,00,0,0,255,0,100,  18,06,23,06,1,255,0,0,255,  18,12,23,12,2,0,0,255,10,  18,18,23,18,1,255,255,0,255,  18,24,23,24,2,0,255,255,10,  18,30,23,30,0,255,0,255,255,  18,36,23,36,0,0,0,255,100,  18,42,23,42,2,255,0,0,255,  18,48,23,48,0,255,255,255,255,  18,54,6,54,1,255,255,255,255};//--------------------------------------// start getArrayCommand(int offset) function//--------------------------------------void getArrayCommand(int offset){  nextHourOn = array[offset][0];  nextMinuteOn = array[offset][1];  nextHourOff = array[offset][2];  nextMinuteOff = array[offset][3];  nextLED = array[offset][4];  nextRed = array[offset][5];  nextGreen = array[offset][6];  nextBlue = array[offset][7];  nextDuration = array[offset][8];}//--------------------------------------// end getArrayCommand(int offset) function//--------------------------------------
LISTING 7
The processEvent() function will search the available COMMANDs in Array[] for match of the present time to either the ON time or OFF time of a command in the Array. If either matches the present time then additional functions are executed to process that match.

//--------------------------------------// start processEvent() function//--------------------------------------void processEvent(){  for(byte i = 0; i < COMMANDS; i++)  {    getArrayCommand(i);    if((nextHourOn == myHour) && (nextMinuteOn == myMinute))    {      modeOn = true;      if(nextDuration == 0)    // no fading      {        durationArray[i] = 0;        updateLED();      }      else                     // fading      {        durationArray[i] = nextDuration;        processDuration(i);      }    }    if((nextHourOff == myHour) && (nextMinuteOff == myMinute))    {      modeOn = false;      if(nextDuration == 0)     // no fading      {        durationArray[i] = 0;        updateLED();      }      else                     // fading      {        durationArray[i] = nextDuration;        processDuration(i);      }    }  }}//--------------------------------------// end processEvent() function//--------------------------------------
LISTING 8
These routines turn the LED colors ON or OFF without fading, store them, and update the LED string.

//-----------------------------// start updateLED() function//-----------------------------void updateLED(){  if(modeOn)                            // On Color  {    RedColor = nextRed;    GreenColor = nextGreen;    BlueColor = nextBlue;  }  else                                  // Off Black  {    RedColor = 0;    GreenColor = 0;    BlueColor = 0;      }  storeAtLED(nextLED);  updateDotStar();}//-----------------------------// end updateLED() function//-----------------------------
LISTING 9
When a COMMAND's nextDuration value (from array[]) is >0, this function calculates how much each color value needs to change for each of that many (value) steps (step = 100ms). This way we can have a smooth transition from the present color to the new color.

//--------------------------------------// start processDuration(byte i) function//--------------------------------------void processDuration(byte i){  if(modeOn == 0)              // Off Black  {    nextRed = 0;    nextGreen = 0;    nextBlue = 0;  }  nextRedArray[i] = DotStarArray[nextLED*4+3];  nextGreenArray[i] = DotStarArray[nextLED*4+2];  nextBlueArray[i] = DotStarArray[nextLED*4+1];  changeRedArray[i] = (nextRed - nextRedArray[i]) / nextDuration;  changeGreenArray[i] = (nextGreen - nextGreenArray[i]) / nextDuration;  changeBlueArray[i] = (nextBlue - nextBlueArray[i]) / nextDuration;}//--------------------------------------// end processDuration(byte i) function//--------------------------------------
LISTING 10
The processFade() function found in loop(), looks for those COMMANDs that have had matches (durationArray[COMMAND] > 0). It calls the updateDurationByte(COMMAND) routine which handles adjusting the appropriate color values for that LED and updating the DotStarArray. updateDotStar() will then send off new data to the LEDs, which includes the slight change in color value.  durationArray[COMMAND] is decremented, so the fading process will eventually end.

//--------------------------------------// start processFade() function//--------------------------------------void processFade(){  for(byte i = 0; i< COMMANDS; i++)  {    getArrayCommand[i];    if(durationArray[i] != 0)       // Fading    {      updateDuration(i);    }    else                            // Fade done    {      //do nothing    }  } }//--------------------------------------// end processFade() function//--------------------------------------//--------------------------------------// start updateDuration(byte LED) function//--------------------------------------void updateDuration(byte c){  nextRedArray[c] = nextRedArray[c] + changeRedArray[c];  RedColor = nextRedArray[c];  nextGreenArray[c] = nextGreenArray[c] + changeGreenArray[c];  GreenColor = nextGreenArray[c];  nextBlueArray[c] = nextBlueArray[c] + changeBlueArray[c];  BlueColor = nextBlueArray[c];  durationArray[c]--;   if(durationArray[c] < 0)  {    durationArray[c] = 0;  }  storeAtLED(array[c][4]);       // Command[nextLED]  updateDotStar();}//--------------------------------------// end updateDuration(byte LED) function//--------------------------------------
PROJECT POWER

This project is powered through the USB connector. The same USB-to-micro cable used to program the device can be used to power the device. You also can use an AC-to-5V charging cube; you probably use one of these to charge your cell phone. The WEMOS D1 mini ESP8266 board requires around 20mA of current. Each RGB LED that is turned full ON (white) will add about 50mA to that total. I’m using a 2.1A charging cube, so it can easily handle a bunch of modules.

To keep the AC socket from becoming overgrown with plugs, I picked up a 7-port USB hub (Figure 8) for about $10. I plug this into the power cube, and now have seven local USB sockets to light seven buildings, and still have an open AC wall socket. I like the fact that each USB port has its own ON/OFF switch.

FIGURE 8
This is an inexpensive 7-port USB hub that will be used to distribute power to up to seven village shops.
FIGURE 8
This is an inexpensive 7-port USB hub that will be used to distribute power to up to seven village shops.

There you have it! Or could this be more user friendly? You could change the array of Commands, such that each device uses different times and colors. Or, since we already have access to the local WAN, we could allow each Command to be changed via a smartphone. Next month: adding a server to the module to allow local control. Stay tuned. Too many words… not enough space. 

RESOURCES
Espressif Systems | www.espressif.com
Wemos | www.wemos.cc

Code and Supporting Files

PUBLISHED IN CIRCUIT CELLAR MAGAZINE • APRIL 2024 #405 – Get a PDF of the issue

Keep up-to-date with our FREE Weekly Newsletter!

Don't miss out on upcoming issues of Circuit Cellar.


Note: We’ve made the Dec 2022 issue of Circuit Cellar available as a free sample issue. In it, you’ll find a rich variety of the kinds of articles and information that exemplify a typical issue of the current magazine.

Would you like to write for Circuit Cellar? We are always accepting articles/posts from the technical community. Get in touch with us and let's discuss your ideas.

— ADVERTISMENT—

—Advertise Here—

Sponsor this Article
Website | + posts

Jeff Bachiochi (pronounced BAH-key-AH-key) has been writing for Circuit Cellar since 1988. His background includes product design and manufacturing. You can reach him at: jeff.bachiochi@imaginethatnow.com or at: www.imaginethatnow.com.

Supporting Companies

Upcoming Events


Copyright © KCK Media Corp.
All Rights Reserved

Copyright © 2026 KCK Media Corp.

Lighting a Miniature Holiday Village 

by Jeff Bachiochi time to read: 16 min