Skip to content

Create Default Class Function

moononournation edited this page Mar 13, 2021 · 1 revision

create_default_Arduino_DataBus()

Arduino_GFX try to find the settings depends on selected board in Arduino IDE, if you selected a dev device that have built-in display the Arduino_GFX can be auto created:

#include <Arduino_GFX_Library.h>
Arduino_DataBus *bus = create_default_Arduino_DataBus();

If the dev board is not yet recognised, a Arduino_ILI9341 class is created.

create_default_Arduino_DataBus()

If your dev board does no built-in display, Arduino_GFX can still use default pin mapping to create a default Arduino_DataBus class for the display:

ESP32 various dev board

TFT_CS: 5, TFT_DC: 27, TFT_RST: 33, TFT_BL: 22

ESP8266 various dev board

TFT_CS: 15, TFT_DC: 5, TFT_RST: 16, TFT_BL: 4

RTL872x various dev board

Require some file patch for RTL8720, more patching details at: https://github.com/mikey60/BW16-RTL8720DN-Module-Arduino.git TFT_CS: 22, TFT_DC: 17, TFT_RST: 23, TFT_BL: 16

Other dev board like Arduino Nano, Micro and more

TFT_CS: 9, TFT_DC: 8, TFT_RST: 7, TFT_BL: 6

Clone this wiki locally