AIoT-creater
Published © MIT

One ESP32 Development Board drives Two Screens

This project shows how to dirve two screens with an ESP32 developent board.

BeginnerFull instructions provided2 hours309
One ESP32 Development Board drives Two Screens

Things used in this project

Hardware components

ESP32-S3 with 1.9inch screen
×1
1.28inch circular screen
×1

Story

Read more

Code

Two screen objects

C/C++
We use the class of GFX to drive the two screens,one screen is an object of the screen class.
//the first screen
Arduino_DataBus *bus = new Arduino_ESP32SPI(11 /* DC */, 10 /* CS */, 12 /* SCK */, 13 /* MOSI */, GFX_NOT_DEFINED /* MISO */);
Arduino_GFX *gfx = new Arduino_GC9A01(bus, 1 /* RST */, 1 /* rotation */, true /* IPS */, 170 /* width */, 320 /* height */, 35 /* col offset 1 */, 0 /* row offset 1 */, 35 /* col offset 2 */, 0 /* row offset 2 */);

//the second screen
Arduino_DataBus *bus2 = new Arduino_ESP32SPI(41 /* DC */, 42 /* CS */, 39 /* SCK */, 0 /* MOSI */, GFX_NOT_DEFINED /* MISO */);
Arduino_GFX *gfx2 = new Arduino_GC9A01(bus2, GFX_NOT_DEFINED /* RST */, 0 /* rotation */, true /* IPS */);

github code

Credits

AIoT-creater
1 project • 0 followers

Comments