ESP32 Clock Using WiFi, ESP-NOW, & Cellular
by Proto G in Circuits > Arduino
12899 Views, 30 Favorites, 0 Comments
ESP32 Clock Using WiFi, ESP-NOW, & Cellular
![Enlight65.JPG](/proxy/?url=https://content.instructables.com/FY7/PBDW/JACTR229/FY7PBDWJACTR229.jpg&filename=Enlight65.JPG)
This is a ESP32 based wifi clock I made for the wireless contest. I decided to make this clock overly wireless so it uses three different forms of wireless communication(WiFi, ESP-NOW, & Cellular). The phone is connected to a cell tower and acting as a wifi hotspot. The first esp32 is connected to the phone and displaying the hour it pulls from an ntp server on the OLED.
The two colons are connected to the phone and transmit the minutes and seconds to the other units using the esp32’s own communication protocol called ESPNOW. The first colon is transmitting the minutes and the second colon is transmitting the seconds.
There are 5 separate programs for this project that I will be sharing below.
![Screen Shot 2017-11-26 at 5.50.10 PM.png](/proxy/?url=https://content.instructables.com/F95/VU13/JACTR2C9/F95VU13JACTR2C9.png&filename=Screen Shot 2017-11-26 at 5.50.10 PM.png)
1. ESP32 Board with built in OLED Display X5
3. Phone than can act as a hotspot or router
Download the Arduino IDE and Required Libraries
![Screen Shot 2017-11-26 at 5.21.53 PM.png](/proxy/?url=https://content.instructables.com/FMI/LJ8E/JACTR23W/FMILJ8EJACTR23W.png&filename=Screen Shot 2017-11-26 at 5.21.53 PM.png)
![Screen Shot 2017-11-26 at 5.54.06 PM.png](/proxy/?url=https://content.instructables.com/F7B/U7JL/JACTR2F2/F7BU7JLJACTR2F2.png&filename=Screen Shot 2017-11-26 at 5.54.06 PM.png)
First, make sure you have the latest Arduino IDE by visiting: https://www.arduino.cc/en/Main/Software
Then make sure you properly install the ESP32 arduino core by following the instructions on the GitHub page here: https://github.com/fesch/arduino-esp32
Download and install the OLED Driver library for the ESP32 here: https://github.com/squix78/esp8266-oled-ssd1306
If you want to make your own font, you should use this font generator: http://oleddisplay.squix.ch/#/home
Click create after you have decided what font you would like to use. The font I used was a plain Nimbus Mono L with a 52 pixel height. After you have installed all of the libraries copy the file from the generator and copy it. Search your computer for a file named oleddisplayfonts.h
Open it with a text editor and paste in your font code at the top and pay attention to the name because you will need to copy it to your program. For example, the name of my font is "Nimbus_Mono_L_Regular_52"
Program Your ESP32 Units
![Screen Shot 2017-11-26 at 5.43.22 PM.png](/proxy/?url=https://content.instructables.com/FM0/71EB/JACTR277/FM071EBJACTR277.png&filename=Screen Shot 2017-11-26 at 5.43.22 PM.png)
Make sure to type in the SSID and Password for the WiFi network you will be connecting to.
Use the Arduino IDE to program the 5 different programs.
![Screen Shot 2017-11-26 at 5.44.45 PM.png](/proxy/?url=https://content.instructables.com/FQZ/NFMC/JACTR27H/FQZNFMCJACTR27H.png&filename=Screen Shot 2017-11-26 at 5.44.45 PM.png)
That's it! This is a great project to help you become familiar with some of the ESP32's functionality and I hope this inspires someone to make something similar.
If you found this instructable helpful, please vote for me in the wireless contest.
Thanks!