WiFi Controlled LED Wedding Table Pieces




About: Hey everyone! My name is Brian and thanks for checking my Instructables. I'm a software developer by trade but I've recently gotten into Arduino development after discovering the esp8266 chip, a WiFi enab...

Hello Everyone!

I recently got married and although my now Wife did most of the planning, I wanted to also put my stamp on the wedding and this is the project I came up with it.

In this instructable I will be showing you how I made WiFi controlled LED lamps that we used as table centers. There was 9 lights in total, each of them were connected to the WiFi and all worked in sync with each other.

In the first GIF you can see an example of all the lights all changing colour at the same time, while in the second GIF you can see them changing at different times to create a pattern.

While you might not have need for 9 of these lamps, I highly recommend building one as I think it looks great and the total price for one lamp is about €10.

Let's get started!

Step 1: Watch the Video

I've made a video describing the project where I will cover the same things as I do in the instructable, so if interested definitely check it out!

Step 2: What You Will Need

As weddings are already expensive enough, and I had nine of these to make I wanted to keep the price down as much as possible! Here is a list of everything I used in this project:

The Lights

Each light is made up of the following:

  • Wemos D1 Mini Clone* (€2 @ Aliexpress) - This is a Arduino board with built in WiFi for €2 delivered, what's not to love! It's based on the popular ESP8266 chip.
  • 16 Neopixel Ring (€1 @ Aliexpress) - A really cheap and easy way to have colour changing LEDS that only uses one GPIO pin of your Arduino
  • 2 x 1200maH battery banks (€3 for both @ Poundland) - As I was using these as table centers in a banquet room, I needed these to be battery powered. I needed around 5 hours of run time and this was the cheapest way of doing it! I'll go into more detail on this later.

I also 3d printed something to attach everything to, this is optional, or could be replaced by anything, even something like Popsicle sticks, you'll see in a later step where its used.

The Controls

To control the lights from one central point I used the following:

  • Raspberry Pi Zero W (~€12 anywhere) - This is the latest pi zero with built in WiFi, any Pi with WiFi should do.
  • Nextt Wifi Router (€12 @ Aliexpress) - Any router could be used for this job, but this one is particularlly nice as it's absolutely tiny and is powered by a micro USB cable

* = Affiliate link

Step 3: Overview of the Project

In this step I'll give a quick overview of what is involved in the project

The router hosts a WiFi point, this network will not have internet, but we don't need it. If the venue has WiFi it might be possible to use that but its good to have a network that you can test before bringing to the venue so you can be sure everything is working!

All the Arduino boards and the Pi connect to this network.

The lights are controlled by a phone/computer that is also connected to this network via a web interface on the Pi

Step 4: Software for Arduino Boards (McLighting)

Each of the Arduino boards are running a software called Mclighting, which a purpose built sketch for controlling Neopixels using an ESP8266 based board.

It comes with a really good web interface which is great for trying out different colours and huge range of different patterns.

The LEDs can also be controlled via REST API, websockets (which I use for this project) or even MQTT

Step 5: Software for the Raspberry Pi (Node-RED)

The software on the PI that we will be using to communitcate with the Arduinos is called Node-RED

It's almost like having your own personal IF this then that (IFTTT), you create flows which are a series of different sequences or events that are caused by different triggers.

If you have a spare Pi I would definitely recommend trying this out, its really configurable and easy to use.

Step 6: Assembling the Light

The circuitry for the light is actually very straight forward

First solder the Neopixel to the Arduino as shown in the second picture, I recommend using stranded wire as it is more flexible for bending

For the battery, the cheapest way of getting the required run time was combining to cheap power banks. NOTE: Before starting this part, make sure you charge both cells and measure them with a multimeter, they should read around 4.1 - 4.2V

Open up both power banks, and desolder the cell from one of them. Be very careful when desoldering here as your iron and the solder are conductive and this is a live circuit!

You then want to solder the cell onto the circuit of the other cell (I found there was room on the other side of the circuit board). When you are happy with this connection you should hot glue it place.

The 3D printed part is just an X, which can be found here if you want it! You could use popsicle sticke or basically anything that lets you hold everything together.

Hot glue the Neopixel ring to the center of the X on top of it. Apply a small amount of hot glue to the bottom of the X near one side, this is where the battery will go (take a look at my pictures to see this in more detail, its off to one side, but not right at the edge) Place the X upside down in the vase, and press the battery down onto the glue and let it dry.

You should now be able to take it out, reinforce with more hot glue. you should now be able to everything back into the lamp the right way around and it should be level

Step 7: Installing McLighting

If you have never used the ESP8266 or Arduino before, we will need to a little bit of software setup. I have a dedicated video for this. It's only 5 minutes long and goes through everything you need to setup.

If videos are not really your thing, check out lesson 2 of Becky's awesome IoT Class, it goes over everything you need as well.

Before you move to the rest of this step you should be able to upload a simple sketch to your ESP8266 (such as the blink example mentioned in both the video and Becky's lesson)


Next you will need to download the software from McLighting's GitHub page. Extract the zip file when its downloaded.

In the Arduino IDE, open the ino file in the folder you just extracted.

In definitions.h change #define ENABLE_MQTT to anything else (as shown in the 3rd picture)

We now need to install some libraries that are required by McLighting, there is a list of them on the projects github, it probably worth going by that list in case the lbirary updates (which would cause this instructable to be out of date). At the time of writing, 3 of the libraries can be installed from the Arduino library manager ( Sketch -> Include Library -> Manage Libraries ): WifiManager, Adafruit Neopixel and Websockets

The only one that isn't on the library manager is WS2812FX one, you will need to download that from Github as we did with Mclighting, although we don't need to extract it this time. When downloaded go to Sketch -> Include Library - Add Zip and add the zip that you just downloaded.

You should now be able to compile the code to check everything is working

Step 8: Modifications to McLighting Sketch

We need to make some small changes to the McLighting sketch.

In definitions.h we need to change PIN and NUMLEDS to match what we have (in my case its D3 and 16)

We also need to change the HOSTNAME as it needsto be unique for all the different lights.

Now in the actual sketch, in the setup method we need to add a static IP address for each ESP8266, add the following line after WiFiManager is first initialized (replace X with a unique number for each one)

wifiManager.setSTAStaticIPConfig(IPAddress(192,168,1,X), IPAddress(192,168,1,1), IPAddress(255,255,255,0));

Finally we need to turn off the onboard LED as it can be seen through the vase, its also in the setup method, there is a comment before it "//keep LED on", you want to change this to

digitalWrite(BUILTIN_LED, HIGH);

You now want to program your board with this sketch.

Step 9: Configuring WiFiManager

If everything went ok your LED ring should now be lighting up Blue, this indicates that it has launched the config mode of WiFiManager

I've talked about WifiManager in a few short videos before, basically it's a really cool piece of sofwtware that allows you to configure your WiFi settings on your ESP8266 without re-programming it.

Your ESP8266 will have created a WiFi network with the same name that we set for the HOSTNAME in the previous step. Connect to this with your phone or laptop

Just like a public Wifi network you should be redirected to the WiFimanager page, enter in the SSID and password of the WiFi network on the router that we will be using for the project

When you save it it will restart the device, your LED ring should now be cycling through a rainbow sequence, this means that it has connected to the network.

Step 10: Uploading the Web Interface

Although we don't technically need it for this project, there is one final step to finalise the setup of McLighting.

Open your browser and type in the IP address of the Arduino, you will see a page not found message.

add '/upload' to the end of the IP address, click the choose file button , navigate to the extracted McLighting folder from the earlier step and go to clients -> web -> builds, upload both these files.

Now when you go to the IP address you should now see the web interface. You should spend some time playing around with the different settings and patterns available, there is a lot!

Step 11: Setting Up the Pi

Node-RED comes pre-installed on the Raspbian, which is the most common OS that people use on their PI

The easiest way to install Raspbian is using the Noobs installer, which you can download from here.

Check out the video above or this link here for information on how to set it up.

When Raspbian is installed, connect to the WiFi network that the Arduino's are on.

You can launch Node-RED the same way as shown in the image above, but realistically you want it to run as a service, so it will run every time your PI turns on. To do that you want to open up a terminal and type in the following:

sudo systemctl enable nodered.service

You will also need to get the IP address of your PI, the easiest way to do that is to type the following into the terminal:


Step 12: Configuring Node-RED

Now from a computer on the same network as the PI we can open a web browser and enter in the PI's ip address followed by :1880 (e.g. This should open the Node-Red web interface.

The first thing you want to do is drag an inject node from the options on the left to center of the screen. Double click on this node

This will pop up a screen as shown in the second picture, for the payload option you want to click the drop down arrow and change it to String, in the text box you need to type =rainbow this will eventually send the command to start the rainbow animation to the Arduino. To see a full list of commands available check out the McLighting github page here. We also want to name node something meaningful in the Name field and click Done

Next we want to select a websocket node from the output options and drag it to the right of out inject node. Again we want to double click on this to edit it.

Under the Path option, select Add new websocket listner and click the edit button beside it (the pencil)

In this screen we want to type the following into the path option:

ws://192.168.1.X:81/ (X should be replaced with the actual IP address of your device.)

Click the Add button

Now give the node a name that is meaningful for being able to identify this light (I just numbered them 1 - 9) and click Done.

Now we just need to connect the output of the Make Rainbow node to the input of our new websocket node. When you have them connected with a line, click the Deloy button up the top right of the screen. You should see a connected status message under the websocket. Now if you click the Make rainbow button (the blue square to the left of the node) you should see your light change colour!

Now you just need to repeat the step of created the websocket node for each light, you can connect each of the inputs to these to the output of make rainbow, this will create the effect of them all changing at the same time.

Play around with the different options in node red to create different sequences etc! A nice simple one is to add a delay to before the input of each one to offset when they change

Step 13: Conclusion

This was a really fun project to do. I was very happy that I could make my tinkering and making part of our big day!

I was really happy how it turned out. I think the lights look really well, and as i mentioned earlier i think its well worth making even one of these as a side lamp, I think the fact that out can make one for €10 is amazing.

I really can't recommend McLighting and Node-RED enough, they are both really excellent pieces of software and made this project possible as I only had a few days to get it sorted!

As always, if you have any questions on any part of the process please let me know and I will be happy to try help.

Thanks a lot!


LED Contest 2017

Runner Up in the
LED Contest 2017

Wireless Contest

Grand Prize in the
Wireless Contest

Arduino Contest 2017

Participated in the
Arduino Contest 2017



    • DIY Summer Camp Contest

      DIY Summer Camp Contest
    • Growing Beyond Earth Maker Contest

      Growing Beyond Earth Maker Contest
    • Games Contest

      Games Contest

    36 Discussions


    6 weeks ago

    Hi, do you have the original Mclighting.ono file as Mclighting has been updated and there is a lot of stuff in there that wont compile.


    Question 1 year ago

    Hi Brian,

    Great intractable - thank you for sharing.

    I've followed your instruction but the sketch for mclightning won't compile.

    I'm getting loads of these:


    Arduino: 1.8.5 (Windows 10), Board: "WeMos D1 R2 & mini, 80 MHz, 4M (1M SPIFFS), v2 Lower Memory, Disabled, None, Only Sketch, 921600"

    In file included from xxx\Arduino\McLighting\McLighting.ino:167:0:

    sketch\request_handlers.h: In function 'void handleSetNamedMode(String)':

    request_handlers.h:195: error: 'stateOn' was not declared in this scope

    stateOn = false;


    All relate to stateOn.

    Am I missing something obvious?

    Kind regards, Simon

    2 answers

    Answer 1 year ago

    Ok. This is caused by the recently upgraded version of McLightning which adds HomeAssistant support and therefore breaks some of the instructions. I resolved the stateOn issue by putting the definition outside of home assistant but still have issue with the json failing... which McLightning version did you use please and where can I get a copy ?


    Reply 10 months ago

    I have the same problem, would you have the old McLightning version!if not a link where to find it?

    or is it possible to have your functional "sketch" !!!! ???

    erreur sketch.jpg

    Question 11 months ago

    I have been trying to get this to work but it appears to be a victim of library updates. Multiple errors associated with libraries - PubSubClient appears to be a center for these.


    Question 1 year ago

    So I have fully made the project and gotten it working via node-red with physical buttons being the primary interface change for changing the light mode. But I am having trouble customizing the modes to a particular value.

    So far I have got it set so that button 1 is off; button 2 is rainbow; and I need button 3 to be set to rainbow but at a %<brightens> setting of 75 or lower.

    I'm just confused on if i need to make a custom <lightmode> setting to do this or if i can simply set it with a modified Web-socket payload.

    1 answer

    Answer 1 year ago

    I think you just need to send two payloads to each light, one to start the rainbow pattern and then one to make the brightness be 75% (which I believe you are right in saying is %<brightness>)

    Remember to do the same for button 2 in your example, but set the brightness to be full: %<255> I think should do it


    1 year ago

    This instructable does work with the updated McLightening (tested @ 05 April 2018). Just enable MQTT and HOMEASSISTANT. Then load both the ArduinoJson and PubSubClient libraries. Works just fine except I didn't get a blue ring when wifi was first activated - I got nothing! The web interface to the wifi configurator still worked though and after adding the McL webpage I was good to go...


    1 year ago

    So that worked well, thanks again Brian.

    I have some neopixel rings sitting in a trolley in Portlaoise I suspect... sighs! The plan was to stick an ESP on these and integrate with Node-RED already running some services here for fake TV during time windows and if the home alarm is in a set condition.

    I am surprised at how easy the websocket works out and the McLighting has a TV mode, as easy as "=tv". I should be able to stick a couple of neopixel rings to the back of TV's to pretend we're busy browsing!

    Thanks, Garry

    1 reply

    Reply 1 year ago

    Thanks Gary!

    I haven't been too bad with customs recently thankfully!

    Yeah both pieces of software in this guide are so great, this project should have been so much harder than it was! It's great that you thought of a use case for them!


    1 year ago

    Great project, Thanks for sharing!
    How did you get the NeoPixels for this price? They are $10 each at least here!

    1 reply

    Reply 1 year ago

    From China! There is a link in the instructable to where I bought them on aliexpress. I was very happy with how they worked out!


    1 year ago

    Whoohoo, congrats Brian! (on the wedding and the contest)

    1 reply

    Reply 1 year ago

    Thanks Becky! I'm still a bit shocked to be honest, I really wasn't expecting it!


    1 year ago

    very nice project and congratulations for your wedding and for winning the wirless contest

    1 reply

    Thank you so much! I honestly can't believe it!

    I think I'm more excited about winning than I was about getting married! (Maybe don't tell my wife that :) )


    1 year ago

    That's an awesome idea. Good details too. Have you ever thought about making a bunch and renting them out to weddings and parties? It would make a neat side business.

    3 replies

    Reply 1 year ago

    Thanks! One of the managers at the hotel was asking if I would be interested in offering them as an option to people, I said that I was but I haven't heard anything back. I may go down that route at some stage, but at the moment I'm just focused on building up my Instructables following and Youtube Channel.


    Reply 1 year ago

    Well I hope you get some traction with that. If you don't mind, I think I'll attempt to put a few together to see if it's a viable option for weddings and parties in my area (Dallas). I think I'll need to find suitable replacement batteries though. The ones you have in your instructable I can't seem to find online. Shouldn't be too difficult though.


    Reply 1 year ago

    I absolutely don't mind! It's completely open for you to do whatever you like with it! Even if I did set something up I don't think I would have too many Texans contacting me in Ireland :)

    I have seen some US youtubers with the same battery so it could be possible to buy them somewhere, but I'm not sure where!

    1200maH is actually quite a small cell, so if you can find a bigger battery for a decent price you might get away with only one.

    One other tip is the vases are quite delicate, so make sure to hold onto the carboard lids and bases for trasnporting. They also get a little finerprintty so might be worth getting some gloves for handling them too!