This repository is a collection of hardware-specific display drivers designed to work with the ESP32NTPClock framework.
Each driver in this collection implements the IDisplayDriver interface from the core library. This allows the main clock engine to remain generic while supporting a wide variety of display technologies like 7-segment LEDs and VFDs.
This library is an add-on and requires the core ESP32NTPClock library to be installed.
This collection currently includes the following drivers:
A driver for common I2C-based 7-segment LED displays that use the Holtek HT16K33 chip.
Usage:
#include <ESP32NTPClock_HT16K33.h>
// For an 8-digit display at the default I2C address of 0x70
DispDriverHT16K33 myDisplay(0x70, 8);A driver for Vacuum Fluorescent Displays (VFD) that use the Maxim MAX6921 chip over the SPI bus.
Usage:
#include <ESP32NTPClock_MAX6921.h>
// For a 12-digit VFD using standard VSPI pins
// DispDriverMAX6921(num_digits, SCLK, MISO, MOSI, SS, BLANK);
DispDriverMAX6921 myDisplay(12, 18, 19, 23, 5, 0);To use one of these drivers in your clock project:
- Install this library (
ESP32NTPClock_Drivers) and the coreESP32NTPClocklibrary. - In your main
.inoor application header file, include the specific driver header you need (e.g.,#include <ESP32NTPClock_HT16K33.h>). - In your application class, create a member variable for the driver object, passing the correct hardware parameters to its constructor.
- Pass a reference to your driver object to the
DisplayManagerconstructor. TheDisplayManagerwill then use your specific hardware to render all animations and scenes.
You can easily add your own driver to this collection by:
- Creating a new header and source file for your driver class.
- Ensuring your class inherits from
public IDisplayDriver. - Providing implementations for all the pure virtual functions defined in the
IDisplayDriverinterface.
This project is licensed under the MIT License.