Modified exisiting project to include some sensors and extra buttons. Can use ESP01 to set time via NTP.
Project tutorial by Ratti3
A large 4-digit 7-segment counter with LiPo backup, in case USB power is cut.
Project showcase by Ratti3
Gixie Clock is a modern device that reproduces the retro beauty of Nixie tube displays.
Project showcase by xingda
A bit more accurate than __TIME__.
Project tutorial by glennedi
From the LEDClock32x8.ino
// pin 12 is connected to the DataIn on the display
// pin 11 is connected to the CLK on the display
// pin 10 is connected to LOAD on the display
#define RandomSeed A0 // Pin used to generate random seed
Note: A0 should not have anything connected, in order to generate a random number in Arduino you need a seed, A0 is used to create the seed as it outputs a random number automatically, this is because it is an analog pin.
If you are using the ESP01:
#define TX 6 // RX pin of ESP01
#define RX 7 // TX pin of ESP01
Button buttonA = Button(2, BUTTON_PULLUP); // Menu button
Button buttonB = Button(3, BUTTON_PULLUP); // Display date / + button
Button buttonC = Button(4, BUTTON_PULLUP); // Temp/Humidity/Pressure / - button
If it shuts down, check your wiring or check if the modules are faulty. Or debug, it's easy to do, just do a serial output in the relevant place so when you press the button it will show what happens before it crashes.
Obviously it does not crash for me, I've made a few of these.
Sorry for the late reply, I completly forgot I posted this here, was busy with work etc.
Thanks for the feedback, looks like the v1.1 DST code does not work properly, I'll try and have a look. I'm using v1.3 (NTP version) so DST calculations are not done hence why I never noticed the issue.
I'm glad the issues are minor considering I doubled the code and never coded in this language before.
Are you saying the time advances by one hour when you first power it on? If so it could be the DST, are you in a DST zone if not try changing bool dst_mode = 1; to 0
Or connect with your social account:
New here? Create an account