MakerBot Print is our newest print-prepration software, which supports native CAD files and STL assemblies,
allows you to interact with all your printers via the Cloud, and many other exciting new features.

Download Now


Wi-Fi Round LED Clock

by leonvandenbeukel Mar 16, 2019
Download All Files

Thing Apps Enabled

Please Login to Comment

Hi all I finally finished the construction of the ring I'm trying to configure the esp module 8266mod this is mine. I have an error message about SSID although the description is correct the following error appears:
conflicting declaration 'const char * ssid' what is the problem? The module is recognized by my router as ESP 577895 who can help me thanks

Comments deleted.

hi everyone, nobody explains to me why the printing of large and small covers is printed only on the frame? what are the settings on the anet a8?

I started building your beautiful wifi clock project.
I have 3 questions
1) I can't print the covers of the ring, only the frame is printed, what are the parameters for Cura software?
2) being a new neo maker can I try to make the LED strip work without using any component but only a 5 volt power supply?
3 I will have difficulty when I will have to connect the various components to the arduino in the video you do not see how the various wires are connected to arduino is it possible to have a scheme even of the connections?
thank you for your reply which I will look forward to. Congratulations again for this beautiful project

Love it. Printed it and now i am struggling adding the WEMOS to the board list in IDE.

Hi! Wonderful and great project! Unfortunately I did not mention the bigger holes when inserting the strip followed by removing the cover of the adhesive tape. Now the Strip is bond to the ring and the LEDs are 2 holes misaligned clockwise. To make it more clear: the strip is not going from 30 minutes to 30 minutes but from 32 minutes to 32 minutes. Is there any chance of changing the code to correct this? Many thx in advance!

Hello can someone share the links to the correct libraries?
Thank you so much

Salve a tutti Bellisimo !!! Fatto e funziona , vorrei soltanto avere il filo in alto , come devo fare ?

Hi Leon,
Just trying out the code without connecting the ESP8266 to anything else, as I wanted to be sure it verified. I have installed the board and also the FastLED Library.
When I verify I get the following error message: (Pasted from output window)

In file included from C:\Users\Alan\Documents\3D\WiFiRound LED Cleck\RoundLEDClock\RoundLEDClock.ino:1:0:
C:\Users\Alan\Documents\Arduino\libraries\Adafruit_ESP8266/Adafruit_ESP8266.h:28:35: error: section attribute not allowed for 'Pchr'
typedef const PROGMEM char Pchr; // Ditto, kindasorta
In file included from C:\Users\Alan\Documents\3D\WiFiRound LED Cleck\RoundLEDClock\RoundLEDClock.ino:20:0:
C:\Users\Alan\Documents\Arduino\libraries\FastLED/FastLED.h:14:21: note: #pragma message: FastLED version 3.002.006

pragma message "FastLED version 3.002.006"


In file included from C:\Users\Alan\Documents\Arduino\libraries\FastLED/FastLED.h:65:0,
from C:\Users\Alan\Documents\3D\WiFiRound LED Cleck\RoundLEDClock\RoundLEDClock.ino:20:
C:\Users\Alan\Documents\Arduino\libraries\FastLED/fastspi.h:110:23: note: #pragma message: No hardware SPI pins defined. All SPI access will default to bitbanged output

pragma message "No hardware SPI pins defined. All SPI access will default to bitbanged output"

The error seems to be reported in the 8266 Library. I have selected the WeMos D1 R1 board because I get lots more errors if I select Generic 8266, and the "Blink" example code verifies withour error using this board setting. Any thoughts on what might be my problem?
Thank you.
nb. Apologies for the bits of large text. It isn't intended but is resulting from pasting the text.

I had the same issue when I installed FastLED through the Arduino IDE "Manage Library". I manually installed it from GitHub and now it works fine for me.

Worked for me too :-)

Hi Leon,
would you mind posting your order links to your power supply and LED stripe? I wonder where to get a propper cable for the stripe you use. How much amperes you get out of your 5V power plug? I thint it has to bee around 4 amps?

By the way nice project.
Thanks for sharing with us.

Greetings Wolfgang

Hi, for the LED strip, just search for 60 LED WS2812B on eBay, aliexpress or any other website. For the power supply you can just use regular 5 volt phone charger. 2A is enough because only 3 LEDs at the same time are enabled.

I'm hoping that someone can help with an issue I have.

I have changed the request NTP time to 60 minutes but when it comes to the request time the LED's just freeze where they are at that time. The only things I have changed in the code is the SSID and password, time zone and the 5 minute request to 60

unsigned long timeZone = 0.0; // Change this value to your local timezone (in my case +1 for Amsterdam)

unsigned long intervalNTP = 60 * 60000; // Request NTP time every 5 minutes

You should also change this:
} else if ((currentMillis - lastNTPResponse) > 3600000) {
Serial.println("More than 1 hour since last NTP response. Rebooting.");

When you only request the NTP time every 60 minutes, but this line checks if the last NTP time was received at least within 1 hour, it could make problems. So increase the time check here as well, to be safe.

I guess your problem is, that this checks fails, because the NTP time is too old and the ESP reboots.

Thank you.

I've left it at the default 5 minute request but increased the response time by 5 minutes in case I go back to the 60 minutes.

I would give it much more if you set it to 60 minutes, i.e. 3 hours or so. Because if you miss one NTP response, it will still restart.
But leave it at 5 minutes, it doesn't matter, also if you are on a metered connection, this single NTP request and response costs not much traffic.

Pasting in a message in the hope someone else has hit this problem and can give me advice.

I'm attempting to build one. All physical assembly is complete. I added support libraries for ESP8266 and FastLED.h to Arduino IDE. I was having some problems uploading the sketch, comm port errors, which I finally got around by shorting D3 and D8 on my Wemos D1. That got me to 100% upload to my board but when I plug it in to power, no lights on the ring. I'm using D6 as my signal port and have followed the wiring schematic you provided. Using a breadboard and small USB breakout as your video and parts diagram shows. I'm a bit at a loss as to how to further diagnose. Any suggestions would be appreciated. I've used LOLIN Wemos D1 R2 & Mini as my board type in Arduino IDE. The only other code change I made was to substitute in my real wifi SSID and password.

Have you still D3 & D8 shorted? I mean also after uploading your sketch?
Try if it works if you remove it.

Normally uploading should work without shorting, not always on the first try, but it works.

No, only shorted to upload the sketch. They aren't shorted now.

Hmm, it is hard to say whats wrong. But try it step by step and forget for a moment the led stripe and connect a simple LED to D6 and upload the blink sketch. Just to see if your Wemos is ok and your D6 is working.

Depending on your multimeter, it can be normal, that you cannot measure something on D6, so don't rely on that.

Problem solved, home WIF is dual band and I was attempting to connect to the higher speed SSID which the Wemos wasn't compatible with. Shifted to the alternate (slower) network segment and voila.......lights!

FYI, measured voltage at theUSB breakout, breadboard and pins on the Wemos. I'm getting +5vDC on the positives. No voltage on the D6 pin.

You could also use another pin. Maybe first try to get the blinking LED example to work with an external LED and then use that pin.

The hour display always remains the same until the end of the hour and does not move as with a normal analog clock. Fortunately, this can be fixed with a small change in the software.

Just change the original function with the one below and the clock should behave like a normal analog clock.

byte getLEDHour(byte hours) {
byte correction = 0;
if (hours > 12)
hours = hours - 12;

if (currentDateTime.minute > 5 && currentDateTime.minute < 15)
correction = 1;
else if (currentDateTime.minute >= 15 && currentDateTime.minute < 30)
correction = 2;
else if (currentDateTime.minute >= 30 && currentDateTime.minute < 45)
correction = 3;
else if (currentDateTime.minute >= 45)
correction = 4;
correction = 0;

if (hours <= 5)
return (hours 5) + 30 + correction;
return (hours
5) - 30 + correction;

It is better to get the code or only the function here : https://gist.github.com/SmithyAT/3a8d70759abc788c4dda4e6ff250e6bb to avoid copy/paste failures from the comment.


Firstly I have to say that I have very little Arduino coding experience so I hope I'm not doing something basic wrong.

When I try and alter the code to replace with yours I get an error highlighting the last line of the replacement code "return (hours 5) - 30 + correction"

expected ')' before numeric constant

I replaced the code from the original "byte getLEDHour(byte hours) {" to the line that returns the error.

Maybe there is a problem with copy and paste here in the comments.
You can find my full code here : https://gist.github.com/SmithyAT/3a8d70759abc788c4dda4e6ff250e6bb

Thank you very much. I've just uploaded a copy of your code and it's looking good so far, fingers crossed it keeps ticking.

That's great. Many thanks for sharing this code.
I wondered whether it might also be useful for the hour LED to include the LED before and the one afterwards as well. This would make the hour 'hand' appear thicker, like a standard clock. It would also mean that the hour and minute hand could be the same color with only the second indicator being different. I could probably make this change but wondered whether anyone thought it a useful idea.

Great work and really nice visual effect! It was a pleasure to build it over the weekend.

But why do you use a USB breakout board? It is not needed with the Wemos D1 mini, there is already a USB connector and you can solder the pins directly to the Wemos board.

Ofcourse the breakout board is optional

Sorry, I forgot something
It's a great project, the 3D prints are very good congratulations and thank you.
Unfortunately I have a problem with the compilation.
I get error message in the following places.

include ,FastLED.h no such file or directory
CRGB LEDs [NUM LEDs] Does not name a type

In how far more error messages will come I do not know.
The selected board under Tools is the LOLIN (WEMOS) D1 R2 & mini.
With an example Sketch this runs also perfectly.
What have I done wrong. Can you help me ?
I would be very grateful for your help.

It's a great project, the 3D prints are very good congratulations and thank you.
Unfortunately I have a problem with the compilation.
I get error message in the following places.

include no such file or directory
CRGB LEDs [NUM LEDs] Does not name a type

In how far more error messages will come I do not know.
The selected board under Tools is the LOLIN (WEMOS) D1 R2 & mini.
With an example Sketch this runs also perfectly.
What have I done wrong. Can you help me ?
I would be very grateful for your help.

Hi, you need to include the FastLED library.


problems with compiling ... Explain more, please?

Arduino: 1.8.9 (Windows 7), Плата:"Arduino/Genuino Uno"

Изменены опции сборки, пересобираем все
RoundLEDClock:15:25: error: ESP8266WiFi.h: No such file or directory

compilation terminated.

exit status 1
ESP8266WiFi.h: No such file or directory

you need to use an ESP8266 based module, this code is not for the Arduino/Genuino Uno
If you are using an ESP8266 you need to change the Board Type in Tools of Arduino IDE software to suite the board you are using

thanks for sharing this great design
I have a couple of quick questions about the code, upon bootup it does not do the sequence of green lights as it connects to the WIFI as per your video of yours - did you remove this from the code?

All seems ok as it displays the time

My other question is approx. every 30 seconds the display changes to show what I think is the date, is there a way of turning this part of the code off?



sorted my issues out
the first issue of not displaying the GREEN LED during startup is that it connects to the wifi straight away before it has a chance to show
the second issue of my LEDS randomly changing to what I thought was the date turns out to be bad WS2812 chips and it is getting corrupted data - tried some 5V WS2811 pixel nodes and they worked without glitch

Leon, great design! I've got the clock & the component box printed and they look great. The wiring was a snap with your Schema directions. One question on the sketch though. Did you source all the libraries from Github? I'm having issues compiling the Arduino sketch. I ran a verbose copy of the errors and from what I see, I think I really only have four errors.

Attached are the sketch and error files. If you have a few minutes to look at it I would really appreciate it. Thanks again for your design!

Hi, you're compiling for a generic ESP module therefore the pin layout is different (error is Invalid pin specified). Check if you selected the correct board type. Alternatively you could try to change pin D6 to just 6.

...and is it possible to bring other colors to the lamp?

Yes you can... Look around line #25 in the sketch file and you'll see the following:

// Change the colors here if you want
// Check for reference: https://github.com/FastLED/FastLED/wiki/Pixel-reference#predefined-colors-list
// You can also set the colors with RGB values, for example red:
// CRGB colorHour = CRGB(255, 0, 0);
CRGB colorHour = CRGB::Red;
CRGB colorMinute = CRGB::Green;
CRGB colorSecond = CRGB::Blue;.

Hey Leon,
very nice project. Would you mind sharing the fusion file of the segment.stl. I'd like to have it a bit sturdier.

Hi, I've added a segment with thicker walls and also one single ring for people with large printers.

I want mine!
I'am thinking some changes in .ino :)
What led strip you are using?
Thanks Leon!

Thanks, the LED strip is a WS2812b 1 meter 60 LED strip.

Thanks for the ask.|
Last question Its 5050?

Sorry for the late response, yes it's 5050.

This is really so nice, well done leon !!
I am going to download and print this.
As I am no hero programming, and I do not know Arduino, I hope a simple copy paste will work without plying with the code.

kind regards
Johan , Antwerp