ESP32 Clock Using WiFi, ESP-NOW, & Cellular

by Proto G in Circuits > Arduino

12868 Views, 30 Favorites, 0 Comments

ESP32 Clock Using WiFi, ESP-NOW, & Cellular

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

1. ESP32 Board with built in OLED Display X5

2. 18650 Lithium Battery

3. Phone than can act as a hotspot or router

4. USB Micro Cable

Download the Arduino IDE and Required Libraries

Screen Shot 2017-11-26 at 5.21.53 PM.png
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

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

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!