Firmware for Lilygo T5 ESP32 boards
Lilygo is a chinese firma
that offers boards that come with an ESP32 and a SPI interface already wired in the PCB. So this boards
should offer a quick start to try CALE since you don't need to soldier or assemble anything.
The steps will be reduced to two:
- Adquire one of this epaper displays
- Prepare up to 3 Screens
Keep in mind the Screen display should match your T5 model size - Download and compile the Firmware
The open source Firmware is here:
https://github.com/martinberlin/eink-calendar/tree/cale_t5
How to compile and upload to your board
We assume that you are familiar with the installation of Platformio that is a great IDE to upload firmware to your boards and also to
keep your dependencies contained in your project.
The configuration is not complicated. After downloading just rename:
lib/Config/Config.h.dist to
Config.h
and fill it with your WiFi name and password.
// Each button corresponds to a Screen in --> CALE.es <-- Register to try it out! char screen1[] = "http://img.cale.es/bmp/USERNAME/SCREENID"; String bearer1 = "cb79cd9e55121ff8f90a28c1ee8353dc53dc27131d87_YOUR_TOKEN"; char screen2[] = "http://cale.es"; String bearer2 = ""; char screen3[] = "http://cale.es"; String bearer3 = "";Since the T5 has 4 buttons, 3 that are wired to a GPIO of the ESP32 and one reset button. Reset will just restart everything and the Firmware will call screen1. Button 2 will make a request to get screen2 and so on. PINs for this boards
The Eink is already wired to the SPI interface, so please check their documentation in the TTGO E-paper repository, to see what version of board you have. We tested this with a T5 2.4 and a Eink of 2.13 inches (250x122)
// Our test T5 had a 2.13" Screen, uncomment the one you have //#define GDEW027W3 // TTGO T5S 2.7" b/w //#define GDEW027C44 // TTGO T5S 2.7" b/w/red #define GDEH0213B73 // TTGO T5 2.13" b/w // 2.13 T5 v2.4 int8_t EINK_CS = 5; int8_t EINK_RST = 16; int8_t EINK_DC = 17; int8_t EINK_BUSY = 4;
Firmware with Bluetooth
Since we wanted to make a Firmware version that you can move and configure different access points you can also use the Bluetooth version for the T5. The only downside is that the default main branch does not have at the moment multi-screen support like this one. Please refer to the Configuring the Firmware using Bluetooth section.
GPIO reference
Name | T5 V1.2 / V2.4 | T5 V2.0 | T5 V2.1 | T5 V2.2 | T5 V2.3 | T5 V2.8 | T5 xxxx |
---|---|---|---|---|---|---|---|
EPaper BUSY | 4 | 4 | 4 | 4 | 4 | 4 | 4 |
EPaper RST | 16 | 16 | 16 | 12 | 16 | 16 | 12 |
EPaper DC | 17 | 17 | 17 | 19 | 17 | 17 | 13 |
EPaper CS | 5 | 5 | 5 | 5 | 5 | 5 | 2 |
EPaper MOSI | 23 | 23 | 23 | 23 | 23 | 23 | 15 |
EPaper MISO | N/A | N/A | N/A | N/A | N/A | N/A | N/A |
EPaper SCLK | 18 | 18 | 18 | 18 | 18 | 18 | 14 |
SDCard CS | 13 | 13 | 13 | 13 | 13 | 13 | N/A |
SDCard MOSI | 15 | 15 | 15 | 23 | 15 | 15 | N/A |
SDCard MISO | 2 | 2 | 2 | 2 | 2 | 2 | N/A |
SDCard SCLK | 14 | 14 | 14 | 18 | 14 | 14 | N/A |
Button 1 | 37 | 39 | 37 | 37 | 39 | 37 | 37 |
Button 2 | 38 | N/A | 38 | 38 | N/A | 38 | 38 |
Button 3 | 39 | N/A | 39 | 39 | N/A | 39 | 39 |
DAC OUT | 25 | N/A | 25 | 25 | N/A | Note1 | N/A |
DS3231 SDA | N/A | N/A | N/A | N/A | N/A | N/A | 21 |
DS3231 SCL | N/A | N/A | N/A | N/A | N/A | N/A | 22 |
LORA MOSI | N/A | N/A | N/A | N/A | N/A | N/A | 27 |
LORA MISO | N/A | N/A | N/A | N/A | N/A | N/A | 19 |
LORA SCLK | N/A | N/A | N/A | N/A | N/A | N/A | 5 |
LORA CS | N/A | N/A | N/A | N/A | N/A | N/A | 18 |
LORA RST | N/A | N/A | N/A | N/A | N/A | N/A | 23 |
LORA DIO0 | N/A | N/A | N/A | N/A | N/A | 2N/A | 26 |
SPRAM | N/A | N/A | N/A | supported | N/A | N/A | supported |
Support EPaper Size | Full Size | Full Size | Full Size | Full Size | Full Size | Full Size | Full Size |
3D print a case
Doing a search for TTGO T5 2.13" in Thingiverse returns some cases for different models. We designed one in CALE for the 2.13 inches (250x122) display:TTGO T5 2.13" ready for your 3D-Printer
And one for the version with bigger epaper display of 264*176 pixels:
TTGO T5 2.7" in Thingiverse