Deze pagina in het Nederlands

ESP8266 / ESP32 with displays



Comparison of ESP8266 and ESP32 microcontroller boards
Examples of ESP clock projects with different displaysIntroduction

Introduction


The ESP8266 and the ESP32 are microcontrollers with WiFi on board. They can be programmed via a USB cable, connected to a PC. Cheap and easy.

Comparison of ESP8266 and ESP32 microcontroller boards

After uploading the code, the microcontroller will work on its own, provided we supply power via battery or adaptor with a USB power cable. These microcontrollers are so cheap and versatile that they have largely succeeded their predecessor - the Arduino. Meanwhile, they are commonplace among thousands of hobbyists worldwide.

Thanks to the many connection possibilities (WiFi, bluetooth, IR remote control, ...) and the possible connections (relay, LED, display, sensor for temperature, etc.), it can be used to create numerous projects to control remotely (drones, thermostat, control of a lock or lamp or motor), or projects that can send alerts to a cell phone. Control via an app on smartphone (even from hundreds of kilometers away) is also easy.

Examples of ESP clock projects with different displays

The examples here are clocks with different displays. Why clocks? They are relatively simple, both in terms of hardware and programming. And they are excellent examples if you want to work with displays. An NTP clock (which synchronizes time over the Internet) must take into account DST or winter time, and must switch automatically. Otherwise, the code is incomplete. Displaying the hour as "14:7" is sloppy. There are numerous methods and functions for using a leading "0".

On this page, the code was kept as compact as possible.



What do you need for this?

What do you need for this?


Download the Arduino IDE (free)

This is the compiler, which you use to write sketches and upload the code to the microcontroller.

How to configure the Arduino IDE for the ESP32

How to configure the Arduino IDE for the ESP8266


How to install libraries in the Arduino IDE

Starter package hardware:

An inexpensive starter pack for the ESP8266
A more expensive (more complete) starter pack for the ESP8266
Solderless connecting wires
An ESP32 microcontroller



TM1637 7-segment displayTM1637 display + ESP8266 / ESP32: NTP clock in 18 lines of code
SSD1306 OLED displaySSD1306 display + ESP8266 | ESP32: NTP clock over I2C
SH1106 OLED displaySH1106 display + ESP8266 | ESP32: NTP clock over I2C
ESP8266 with integrated SSD1306 displayESP8266 + integrated display SSD1306
ST7735 SPI colour displaySPI display ST7735 (160*124px) + ESP8266: flicker-free NTP clock
2.13 inch e-paper display2.13 inch e-paper display + ESP32: flicker-free NTP clock
ST7789 SPI colour displaySPI display ST7789 (320*240px) + ESP8266: sharp NTP clock
ESP32-3248S035 with integrated touchscreenESP32-3248S035: integrated display (480 * 320px) with live electricity prices
Lilygo TTGO T-DisplayLilygo TTGO T-Display (ESP32): clock with switchable time zones
Lilygo T-Display S3Lilygo T-Display S3 (ESP32): clock with deep sleep and time zones
Waveshare ESP32-S3 1.54 inchWaveshare ESP32-S3 1.54inch: LovyanGFX Hello World sketch
WiFi setup portal in the browserConnecting to WiFi: no hard-coded password
Display with live meter data and socketsESP32 + display: read digital electricity meter data