- Vorschlag für eine Systematik der SPI-Pins
- Die Bibliothek Adafruit_GFX
- TFT-Displays mit 160×128 Pixeln
- TFT-Displays mit 320×240 Pixeln
- TFT-Display mit 240×240 Pixel
- TFT-Display mit 480×320 Pixeln
- Sonderzeichen anzeigen
- Schriften mit der Bibliothek Adafruit_GFX
- Zusätzliche Schriften mit der Bibliothek U8g2_for_Adafruit_GFX
- Bitmaps darstellen
- GFXcanvas - Flackern des TFTs vermeiden
- Quellen
Vorschlag für eine Systematik der SPI-Pins
Leider verwenden die Hersteller die unterschiedlichsten Namen für die SPI-Pins. Um etwas Ordnung in die verschiedenen Bezeichnungen der SPI-Pins zu bringen habe ich mir eine farbliche Systematik überlegt:
Farben SPI-Pins
Bezeichnung SPI-Pin | Farbe |
---|---|
VCC/LEDA | rot |
GND | schwarz |
CS | weiß |
DC/RS/A0 | grün |
RESET/RES/RST | gelb |
CLK/SCK/SCL | braun |
COPI/DIN/SDA/SDI (MOSI) | blau |
Für die ESP-Mikrocontroller steht die alternative ⇒Bibliothek TFT_eSPI zur Verfügung.
Die Bibliothek Adafruit_GFX
Die Treiber aller TFT-Displays verwenden die Bibliothek Adafruit_GFX.
- TFT-Display mit 160×128 Pixeln: Adafruit_ST7735
- TFT-Display mit 320×240 Pixeln:Adafruit_ILI9341
- TFT-Display mit 240×240 Pixeln: Adafruit_GC9A01A
- TFT-Display mit 480×320 Pixeln Adafruit_ST7796S_kbv
Funktionen der Bibliothek Adafruit_GFX_Library
Schlüsselwort | Parameter | Aktion |
---|---|---|
width(); | Bildschirmbreite feststellen | |
height(); | Bildschirmhöhe feststellen | |
setRotation(Richtung); | Richtung = 0 → nicht drehen Richtung = 1 → 90° drehen Richtung = 2 → 180° drehen Richtung = 3 → 270 ° drehen | Bildschirm ausrichten |
fillScreen(Farbe); | Bildschirmhintergrund | |
drawLine(StartX, StartY, EndeX, EndeY, Farbe); | Linie zeichnen | |
drawFastHLine(StartX, StartY, Länge, Farbe); | horizontale Linie zeichnen | |
drawFastVLine(StartX, StartY, Länge, Farbe); | vertikale Linie zeichnen | |
drawRect(StartX, StartY,, Breite, Höhe, Farbe); | Rechteck zeichnen | |
drawRoundRect(StartX, StartY, Breite, Höhe, Eckenradius, Farbe); | abgerundetes Rechteck zeichnen | |
fillRoundRect(StartX, StartY, Breite, Höhe, Eckenradius, Füllfarbe); | ausgefülltes abgerundetes Rechteck zeichnen | |
fillRect(StartX, StartY, Breite, Höhe, Füllfarbe); | ausgefülltes Rechteck zeichnen | |
drawCircle(MittelpunktX, MittelpunktY, Radius, Farbe); | Kreis zeichnen | |
fillCircle(MittelpunktX, MittelpunktY, Radius, Füllfarbe); | Ausgefüllten Kreis zeichnen | |
drawTriangle(x1, y1, x2, y2, x3, y3, Farbe); | Dreieck zeichnen: x1, y1: 1.Punkt x2, y2: 2.Punkt x3, y3: 3.Punkt | |
fillTriangle(x1, y1, x2, y2, x3, y3, Füllfarbe); | ausgefülltes Dreieck zeichnen: x1, y1: 1.Punkt x2, y2: 2.Punkt x3, y3: 3.Punkt | |
setCursor(x, y); | Cursor setzen | |
setTextSize(Textgröße); | Textgröße | Textgröße bestimmen |
setTextColor(Farbe); | Textfarbe setzen | |
print("Text"); println("Text"); | Text schreiben | |
setTextWrap(true/false); | false → Text fließt über den Rand des TFTs hinaus true → Text wird am Ende umgebrochen | Zeilenumbruch |
invertDisplay(); | 0 → Farben nicht tauschen 1 → Farben tauschen | |
color565(rot, grün, blau); | rot: 0 - 255 grün: 0 - 255 blau: 0 - 255 | beliebige Mischfarben erstellen |
drawBitmap(PosX, PosY, Array, ArrayGrößeX, ArrayGrößeY, Farbe); | Array als Bild darstellen | |
TFT-Displays mit 160×128 Pixeln
Benötigte Bibliothek installieren.
Installiere auch die zusätzlich benötigten Bibliotheken.


Adafruit Pinbelegung
Pin TFT | UNO R3/R4 Nano | ESP32-Wroom | Wemos D1 Mini/NodeMCU | ESP32-C6 |
---|---|---|---|---|
Gnd (1) | GND | GND | GND | GND |
VCC (2) | 5V | 5V | 5V | 5V |
RESET (3) | 8 | 4 | D1 | 3 |
DC (4) | 9 | 2 | D2 | 2 |
CARD_CS (5) | ||||
TFT_CS (6) | 10 | 5 | D8 | 18 |
COPI/SDO (7) | 11 | 23 | D7 | 19 |
SCK (8) | 13 | 18 | D5 | 21 |
SDI (9) | ||||
LITE (10) | 5V | 5V | 5V | 5V |

1,77 Zoll Pinbelegung
Pin TFT | UNO R3/R4 Nano | ESP32-Wroom | Wemos D1 Mini/NodeMCU | ESP32-C6 | XIAO-ESP32-C3 |
---|---|---|---|---|---|
GND | GND | GND | GND | GND | GND |
VCC | 5V | 5V | 5V | 5V | 5V |
SCK | 13 | 18 | D5 | 21 | D8 |
SDA (COPI) | 11 | 23 | D7 | 19 | D10 |
RES (RST) | 8 | 4 | D1 | 3 | D1 |
RS (DC) | 9 | 2 | D2 | 2 | D2 |
CS | 10 | 5 | D8 | 18 | D7 |
LEDA | 3,3V | 3,3V | 3,3V | 3,3V | 3,3V |

TFT Waveshare Pinbelegung
Pin TFT | UNO R3/R4 Nano | ESP32-Wroom | Wemos D1 Mini/NodeMCU | ESP32-C6 | XIAO-ESP32-C3 |
---|---|---|---|---|---|
VCC (1) | 5V | 5V | 5V | 5V | 5V |
GND (2) | GND | GND | GND | GND | GND |
DIN (3) | 11 | 23 | D7 | 19 | D10 |
CLK (4) | 13 | 18 | D5 | 21 | D8 |
CS (5) | 10 | 5 | D8 | 18 | D7 |
DC (6) | 9 | 2 | D2 | 2 | D2 |
RST (7) | 8 | 4 | D1 | 3 | D1 |
BL (8) | 5V | 5V | 5V | 5V | 3,3V |
Beispielprogramm
Du musst noch die SPI-Pins an den jeweiligen Mikrocontroller anpassen.
#include "Adafruit_ST7735.h"
// Arduino UNO
// #define TFT_CS 10
// #define TFT_RST 9
// #define TFT_DC 8
// Wemos D1 Mini
// #define TFT_CS D8
// #define TFT_RST D1
// #define TFT_DC D2
// XIAO
// #define TFT_CS D7
// #define TFT_RST D1
// #define TFT_DC D2
// Arduino Nano ESP 32
// #define TFT_CS 10
// #define TFT_RST 9
// #define TFT_DC 8
// ESP32-C6
// #define TFT_CS 18
// #define TFT_RST 3
// #define TFT_DC 2
// ESP32-WROOM
// #define TFT_CS 5
// #define TFT_RST 4
// #define TFT_DC 2
// Farben
#define SCHWARZ 0x0000
#define WEISS 0xFFFF
#define BLAU 0x001F
#define ROT 0xF800
#define GRUEN 0x07E0
#define CYAN 0x07FF
#define MAGENTA 0xF81F
#define GELB 0xFFE0
#define BRAUN 0x9A60
#define GRAU 0x7BEF
#define GRUENGELB 0xB7E0
#define DUNKELCYAN 0x03EF
#define ORANGE 0xFDA0
#define PINK 0xFE19
#define BORDEAUX 0xA000
#define HELLBLAU 0x867D
#define VIOLETT 0x915C
#define SILBER 0xC618
#define GOLD 0xFEA0
Adafruit_ST7735 tft = Adafruit_ST7735(TFT_CS, TFT_DC, TFT_RST);
void setup()
{
// Zufallsgenerator starten
randomSeed(analogRead(A0));
Serial.begin(9600);
delay(500);
Serial.println("Bildschirm: " + String(tft.height()) + " x " + String(tft.width()));
// TFT starten
tft.initR(INITR_BLACKTAB);
// Rotation anpassen
tft.setRotation(0);
// schwarzer Hintergrund
tft.fillScreen(SCHWARZ);
// interne Textdarstellung
tft.setTextSize(1);
tft.setCursor(1, 5);
tft.setTextColor(BLAU);
tft.print("Text");
delay(500);
tft.setTextSize(3);
tft.setCursor(1, 40);
tft.setTextColor(GRUEN);
tft.print("Text");
delay(500);
tft.setTextSize(4);
tft.setCursor(1, 70);
tft.setTextColor(ROT);
tft.print("Text");
delay(2000);
// Sonderzeichen darstellen
tft.fillScreen(SCHWARZ);
tft.setTextColor(WEISS);
tft.setCursor(1, 20);
tft.setTextSize(2);
// Großstädte
tft.println();
tft.print("Gro");
tft.write(0xe);
tft.print("st");
tft.write(0x84);
tft.print("dte");
// Düsseldorf
tft.println();
tft.print("D");
tft.write(0x81);
tft.print("sseldorf");
// Köln
tft.println();
tft.print("K");
tft.write(0x94);
tft.println("ln");
tft.println();
tft.println("Temperatur");
tft.print("20");
tft.write(0xf7);
tft.print("C");
delay(2000);
// zufällige Pixel
tft.fillScreen(SCHWARZ);
for (int i = 0; i < 700; i++)
{
int PixelX = random(1, tft.width());
int PixelY = random(1, tft.height());
tft.drawPixel(PixelX, PixelY, tft.color565(random(255),random(255),random(255)));
delay(5);
}
delay(2000);
// Linien ziehen
tft.fillScreen(SCHWARZ);
for (int i = 1; i < tft.height(); i+=10)
{
tft.drawLine(1, i, tft.width(), i, ORANGE);
}
delay(2000);
// Kreise vom Mittelpunkt zeichnen
tft.fillScreen(SCHWARZ);
for (int i = 1; i < tft.width() / 2; i+=10)
{
tft.fillCircle(tft.width() / 2, tft.height() / 2, tft.width() / 2 - i, tft.color565(random(255),random(255),random(255)));
delay(50);
}
delay(2000);
// Rechtecke zeichnen
tft.fillScreen(SCHWARZ);
for (int i = 1; i < tft.width(); i+=10)
{
tft.drawRect(tft.width() / 2 - i / 2, tft.height() / 2 - i / 2 , i, i, tft.color565(random(255),random(255),random(255)));
}
delay(2000);
// ausgefüllte Rechtecke zeichnen
tft.fillScreen(SCHWARZ);
for (int i = 1; i < tft.width() / 2; i+=10)
{
tft.fillRect(i, i, i, i, tft.color565(random(ROT),random(GRUEN),random(BLAU)));
delay(50);
}
delay(2000);
// Dreiecke
tft.fillScreen(SCHWARZ);
for (int i = 1; i <tft.width(); i+=10)
{
tft.fillTriangle(i, i, 100, 100, 1, tft.width(), tft.color565(random(255),random(255),random(255)));
delay(50);
}
}
void loop()
{
// nichts zu tun, das Programm
// läuft nur einmal
}
TFT-Displays mit 320×240 Pixeln
Benötigte Bibliothek installieren.
Installiere auch die zusätzlich benötigten Bibliotheken.


TFT Waveshare Pinbelegung
Pin TFT | UNO R3/R4 Nano | ESP32-Wroom | Wemos D1 Mini/NodeMCU | ESP32-C6 | XIAO-ESP32-C3 |
---|---|---|---|---|---|
VCC (1) | 5V | 5V | 5V | 5V | 5V |
GND (2) | GND | GND | GND | GND | GND |
DIN (3) | 11 | 23 | D7 | 19 | D10 |
CLK (4) | 13 | 18 | D5 | 21 | D8 |
CS (5) | 10 | 5 | D8 | 18 | D7 |
DC (6) | 9 | 2 | D2 | 2 | D2 |
RST (7) | 8 | 4 | D1 | 3 | D1 |
BL (8) | 5V | 5V | 5V | 5V | 3,3V |

2,2 Zoll Pinbelegung
Pin TFT | UNO R3/R4 Nano | ESP32-Wroom | Wemos D1 Mini/NodeMCU | ESP32-C6 | XIAO-ESP32-C3 |
---|---|---|---|---|---|
SDO | |||||
LED | 3,3V | 3,3V | 3,3V | 3,3V | 3,3V |
SCK | 13 | 18 | D5 | 21 | D8 |
SDI | 11 | 23 | D7 | 19 | D10 |
DC | 9 | 2 | D2 | 2 | D2 |
RESET | 8 | 4 | D1 | 3 | D1 |
CS | 10 | 5 | D8 | 18 | D7 |
GND | GND | GND | GND | GND | GND |
VCC | 5V | 5V | 5V | 5V | 5V |
Beispielprogramm
#include "Adafruit_ILI9341.h"
// Arduino UNO
// #define TFT_CS 10
// #define TFT_RST 9
// #define TFT_DC 8
// Wemos D1 Mini
// #define TFT_CS D8
// #define TFT_RST D1
// #define TFT_DC D2
// XIAO
// #define TFT_CS D7
// #define TFT_RST D1
// #define TFT_DC D2
// Arduino Nano ESP 32
// #define TFT_CS 10
// #define TFT_RST 9
// #define TFT_DC 8
// ESP32-C6
// #define TFT_CS 18
// #define TFT_RST 3
// #define TFT_DC 2
// ESP32-WROOM
// #define TFT_CS 5
// #define TFT_RST 4
// #define TFT_DC 2
// Farben
#define SCHWARZ 0x0000
#define WEISS 0xFFFF
#define BLAU 0x001F
#define ROT 0xF800
#define GRUEN 0x07E0
#define CYAN 0x07FF
#define MAGENTA 0xF81F
#define GELB 0xFFE0
#define BRAUN 0x9A60
#define GRAU 0x7BEF
#define GRUENGELB 0xB7E0
#define DUNKELCYAN 0x03EF
#define ORANGE 0xFDA0
#define PINK 0xFE19
#define BORDEAUX 0xA000
#define HELLBLAU 0x867D
#define VIOLETT 0x915C
#define SILBER 0xC618
#define GOLD 0xFEA0
Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC, TFT_RST);
void setup()
{
// Zufallsgenerator starten
randomSeed(analogRead(A0));
Serial.begin(9600);
delay(500);
Serial.println("Bildschirm: " + String(tft.height()) + " x " + String(tft.width()));
// TFT starten
tft.begin();
// Rotation anpassen
tft.setRotation(2);
// schwarzer Hintergrund
tft.fillScreen(SCHWARZ);
// interne Textdarstellung
tft.setTextSize(1);
tft.setCursor(1, 5);
tft.setTextColor(BLAU);
tft.print("Text");
delay(500);
tft.setTextSize(3);
tft.setCursor(1, 40);
tft.setTextColor(GRUEN);
tft.print("Text");
delay(500);
tft.setTextSize(5);
tft.setCursor(1, 70);
tft.setTextColor(ROT);
tft.print("Text");
delay(500);
tft.setTextSize(7);
tft.setCursor(1, 120);
tft.setTextColor(GELB);
tft.print("Text");
delay(500);
tft.setTextSize(9);
tft.setCursor(1, 200);
tft.setTextColor(GRAU);
tft.print("Text");
delay(2000);
// Sonderzeichen darstellen
tft.fillScreen(SCHWARZ);
tft.setTextColor(WEISS);
tft.setCursor(10, 20);
tft.setTextSize(3);
// Großstädte
tft.println();
tft.print("Gro");
tft.write(0xe);
tft.print("st");
tft.write(0x84);
tft.print("dte");
// Düsseldorf
tft.println();
tft.print("D");
tft.write(0x81);
tft.print("sseldorf");
// Köln
tft.println();
tft.print("K");
tft.write(0x94);
tft.println("ln");
tft.println();
tft.println("Temperatur:");
tft.print("20");
tft.write(0xf7);
tft.print("C");
delay(2000);
// zufällige Pixel
tft.fillScreen(SCHWARZ);
for (int i = 0; i < 700; i++)
{
int PixelX = random(1, tft.width());
int PixelY = random(1, tft.height());
tft.drawPixel(PixelX, PixelY, tft.color565(random(255),random(255),random(255)));
delay(5);
}
delay(2000);
// Linien ziehen
tft.fillScreen(SCHWARZ);
for (int i = 1; i < tft.height(); i+=10)
{
tft.drawLine(1, i, tft.width(), i, ORANGE);
}
delay(2000);
// Kreise vom Mittelpunkt zeichnen
tft.fillScreen(SCHWARZ);
for (int i = 1; i < tft.width() / 2; i+=10)
{
tft.fillCircle(tft.width() / 2, tft.height() / 2, tft.width() / 2 - i, tft.color565(random(255),random(255),random(255)));
delay(50);
}
delay(2000);
// Rechtecke zeichnen
tft.fillScreen(SCHWARZ);
for (int i = 1; i < tft.width(); i+=10)
{
tft.drawRect(tft.width() / 2 - i / 2, tft.height() / 2 - i / 2 , i, i, tft.color565(random(255),random(255),random(255)));
}
delay(2000);
// ausgefüllte Rechtecke zeichnen
tft.fillScreen(SCHWARZ);
for (int i = 1; i < tft.width() / 2; i+=10)
{
tft.fillRect(i, i, i, i, tft.color565(random(255),random(255),random(255)));
delay(50);
}
delay(2000);
// Dreiecke
tft.fillScreen(SCHWARZ);
for (int i = 1; i <tft.width(); i+=10)
{
tft.fillTriangle(i, i, 100, 100, 1, tft.width(), tft.color565(random(255),random(255),random(255)));
delay(50);
}
}
void loop()
{
// nichts zu tun, das Programm
// läuft nur einmal
}
TFT-Display mit 240×240 Pixel


TFT 240×240 Pinbelegung
Pin TFT | UNO R3/R4 Nano | ESP32-Wroom | ESP32-C6 | Wemos D1 Mini/NodeMCU | XIAO-ESP32-C3 |
---|---|---|---|---|---|
VCC | 3,3V | 3,3V | 3,3V | 3,3V | 3,3V |
GND | GND | GND | GND | GND | GND |
SCL (SCK) | 13 | 18 | 21 | D5 | D8 |
SDA (COPI) | 11 | 23 | 19 | D7 | D10 |
DC | 9 | 2 | 2 | D2 | D2 |
CS | 10 | 5 | 18 | D8 | D7 |
RST | 8 | 4 | 3 | D1 | D1 |
Beispielprogramm
#include "Adafruit_GFX.h"
#include "Adafruit_GC9A01A.h"
// Arduino UNO
// #define TFT_CS 10
// #define TFT_RST 9
// #define TFT_DC 8
// Wemos D1 Mini
// #define TFT_CS D8
// #define TFT_RST D1
// #define TFT_DC D2
// XIAO
// #define TFT_CS D7
// #define TFT_RST D1
// #define TFT_DC D2
// Arduino Nano ESP 32
// #define TFT_CS 10
// #define TFT_RST 9
// #define TFT_DC 8
// ESP32-C6
// #define TFT_CS 18
// #define TFT_RST 3
// #define TFT_DC 2
// ESP32-WROOM
// #define TFT_CS 5
// #define TFT_RST 4
// #define TFT_DC 2
// Farben
#define SCHWARZ 0x0000
#define WEISS 0xFFFF
#define BLAU 0x001F
#define ROT 0xF800
#define GRUEN 0x07E0
#define CYAN 0x07FF
#define MAGENTA 0xF81F
#define GELB 0xFFE0
#define BRAUN 0x9A60
#define GRAU 0x7BEF
#define GRUENGELB 0xB7E0
#define DUNKELCYAN 0x03EF
#define ORANGE 0xFDA0
#define PINK 0xFE19
#define BORDEAUX 0xA000
#define HELLBLAU 0x867D
#define VIOLETT 0x915C
#define SILBER 0xC618
#define GOLD 0xFEA0
Adafruit_GC9A01A tft(TFT_CS, TFT_DC);
void setup()
{
// Zufallsgenerator starten
randomSeed(analogRead(A0));
Serial.begin(9600);
delay(500);
Serial.println("Bildschirm: " + String(tft.height()) + " x " + String(tft.width()));
// TFT starten
tft.begin();
// Rotation anpassen
tft.setRotation(2);
// schwarzer Hintergrund
tft.fillScreen(SCHWARZ);
// interne Textdarstellung
tft.setTextSize(3);
tft.setCursor(30, 50);
tft.setTextColor(BLAU);
tft.print("Text");
delay(500);
tft.setTextSize(4);
tft.setCursor(30, 80);
tft.setTextColor(GRUEN);
tft.print("Text");
delay(2000);
// zufällige Pixel
tft.fillScreen(SCHWARZ);
for (int i = 0; i < 700; i++)
{
int PixelX = random(1, tft.width());
int PixelY = random(1, tft.height());
tft.drawPixel(PixelX, PixelY, tft.color565(random(255),random(255),random(255)));
delay(5);
}
delay(2000);
// Kreise vom Mittelpunkt zeichnen
tft.fillScreen(SCHWARZ);
for (int i = 1; i < tft.width() / 2; i+=5)
{
tft.drawCircle(tft.width() / 2, tft.height() / 2, tft.width() / 2 - i, tft.color565(random(255),random(255),random(255)));
delay(50);
}
delay(2000);
for (int i = 1; i < tft.width() / 2; i+=5)
{
tft.drawCircle(tft.width() / 2, tft.height() / 2, tft.width() / 2 - i, SCHWARZ);
delay(50);
}
delay(2000);
// Kreise vom Mittelpunkt zeichnen
tft.fillScreen(SCHWARZ);
for (int i = 1; i < tft.width() / 2; i+=10)
{
tft.fillCircle(tft.width() / 2, tft.height() / 2, tft.width() / 2 - i, tft.color565(random(255),random(255),random(255)));
delay(50);
}
delay(2000);
/*
alle 30° Linie vom Mittelpunkt zeichnen
120 = Radius des TFTs (240/2)
90 = PI/4 (Viertelkreis)
DEG_TO_RAD (0.0174532925) -> Winkel in Bogenmaß umrechnen
es ensteht ein Dreieck mit einem Rechten Winkel
-> Winkelfunktionen sin/cos anwenden
*/
tft.fillScreen(SCHWARZ);
for (int i = 0; i < 360; i += 30)
{
float PosX = cos((i - 90) * DEG_TO_RAD) * 120;
float PosY = sin((i - 90) * DEG_TO_RAD) * 120;
int PunktX = PosX + 120;
int PunktY = PosY + 120;
tft.drawLine(120, 120, PosX + 120, PosY + 120, WEISS);
}
delay(2000);
}
void loop()
{
// nichts zu tun, das Programm
// läuft nur einmal
}
TFT-Display mit 480×320 Pixeln

4,0 Zoll Pinbelegung
Pin TFT | UNO R3/R4/Nano | ESP32-Wroom | Wemos D1 Mini/NodeMCU | ESP32-C6 | XIAO-ESP32-C3 |
---|---|---|---|---|---|
VCC | 5V | 5V | 5V | 5V | 5V |
GND | GND | GND | GND | GND | GND |
CS | 10 | 5 | D8 | 18 | D7 |
RESET | 8 | 4 | D1 | 3 | D1 |
DC/RS | 9 | 2 | D2 | 2 | D2 |
SDI | 11 | 23 | D7 | 19 | D10 |
SCK | 13 | 18 | D5 | 21 | D8 |
LED | 5V | 5V | 5V | 5V | 5V |
Die verwendete Bibliothek kann nicht über die Bibliotheksverwaltung installiert werden. Sie muss herunter geladen werden:
https://github.com/prenticedavid/Adafruit_ST7796S_kbv
und mit
Sketch -> Bibliothek einbinden -> zip-Bibliothek hinzufügen
installiert werden.
Beispielprogramm
#include "Adafruit_GFX.h"
#include "Adafruit_ST7796S_kbv.h"
// Arduino UNO
// #define TFT_CS 10
// #define TFT_RST 9
// #define TFT_DC 8
// Wemos D1 Mini
// #define TFT_CS D8
// #define TFT_RST D1
// #define TFT_DC D2
// XIAO
// #define TFT_CS D7
// #define TFT_RST D1
// #define TFT_DC D2
// Arduino Nano ESP 32
// #define TFT_CS 10
// #define TFT_RST 9
// #define TFT_DC 8
// ESP32-C6
// #define TFT_CS 18
// #define TFT_RST 3
// #define TFT_DC 2
// ESP32-WROOM
// #define TFT_CS 5
// #define TFT_RST 4
// #define TFT_DC 2
Adafruit_ST7796S_kbv tft = Adafruit_ST7796S_kbv(TFT_CS, TFT_DC, TFT_RST);
// Farben
#define SCHWARZ 0x0000
#define WEISS 0xFFFF
#define BLAU 0x001F
#define ROT 0xF800
#define GRUEN 0x07E0
#define CYAN 0x07FF
#define MAGENTA 0xF81F
#define GELB 0xFFE0
#define BRAUN 0x9A60
#define GRAU 0x7BEF
#define GRUENGELB 0xB7E0
#define DUNKELCYAN 0x03EF
#define ORANGE 0xFDA0
#define PINK 0xFE19
#define BORDEAUX 0xA000
#define HELLBLAU 0x867D
#define VIOLETT 0x915C
#define SILBER 0xC618
#define GOLD 0xFEA0
void setup()
{
// TFT starten
tft.begin();
// Rotation anpassen
tft.setRotation(0);
// wenn die Farben invertiert sind
// weiß = schwarz, schwarz = weiss ...
// // entfernen
// tft.invertDisplay(1);
// schwarzer Hintergrund
tft.fillScreen(SCHWARZ);
// interne Textdarstellung
tft.setTextSize(1);
tft.setCursor(1, 5);
tft.setTextColor(BLAU);
tft.print("Text");
delay(500);
tft.setTextSize(3);
tft.setCursor(1, 40);
tft.setTextColor(GRUEN);
tft.print("Text");
delay(500);
tft.setTextSize(5);
tft.setCursor(1, 70);
tft.setTextColor(ROT);
tft.print("Text");
tft.setTextSize(7);
tft.setCursor(1, 120);
tft.setTextColor(ORANGE);
tft.print("Text");
delay(2000);
// Sonderzeichen darstellen
tft.fillScreen(SCHWARZ);
tft.setTextColor(WEISS);
tft.setCursor(1, 20);
tft.setTextSize(4);
// Großstädte
tft.println();
tft.print("Gro");
tft.write(0xe);
tft.print("st");
tft.write(0x84);
tft.print("dte");
// Düsseldorf
tft.println();
tft.print("D");
tft.write(0x81);
tft.print("sseldorf");
// Köln
tft.println();
tft.print("K");
tft.write(0x94);
tft.println("ln");
tft.println();
tft.println("Temperatur");
tft.print("20");
tft.write(0xf7);
tft.print("C");
delay(2000);
// zufällige Pixel
tft.fillScreen(SCHWARZ);
for (int i = 0; i < 700; i++)
{
int PixelX = random(1, tft.width());
int PixelY = random(1, tft.height());
tft.drawPixel(PixelX, PixelY, tft.color565(random(255),random(255),random(255)));
delay(5);
}
delay(2000);
// Linien ziehen
tft.fillScreen(SCHWARZ);
for (int i = 1; i < tft.height(); i+=10)
{
tft.drawLine(1, i, tft.width(), i, ORANGE);
}
delay(2000);
// Kreise vom Mittelpunkt zeichnen
tft.fillScreen(SCHWARZ);
for (int i = 1; i < tft.width() / 2; i+=10)
{
tft.fillCircle(tft.width() / 2, tft.height() / 2, tft.width() / 2 - i, tft.color565(random(255),random(255),random(255)));
delay(50);
}
delay(2000);
// Rechtecke zeichnen
tft.fillScreen(SCHWARZ);
for (int i = 1; i < tft.width(); i+=10)
{
tft.drawRect(tft.width() / 2 - i / 2, tft.height() / 2 - i / 2 , i, i, tft.color565(random(255),random(255),random(255)));
}
delay(2000);
// ausgefüllte Rechtecke zeichnen
tft.fillScreen(SCHWARZ);
for (int i = 1; i < tft.width() / 2; i+=10)
{
tft.fillRect(i, i, i, i, tft.color565(random(ROT),random(GRUEN),random(BLAU)));
delay(50);
}
delay(2000);
// Dreiecke
tft.fillScreen(SCHWARZ);
for (int i = 1; i <tft.width(); i+=10)
{
tft.fillTriangle(i, i, 100, 100, 1, tft.width(), tft.color565(random(255),random(255),random(255)));
delay(50);
}
}
void loop()
{
// nichts zu tun, das Programm
// läuft nur einmal
}
Alternative Bibliothek

#include "ILI9486_SPI.h"
// Arduino UNO
// #define TFT_CS 10
// #define TFT_RST 9
// #define TFT_DC 8
// Wemos D1 Mini
// #define TFT_CS D8
// #define TFT_RST D1
// #define TFT_DC D2
// XIAO
// #define TFT_CS D7
// #define TFT_RST D1
// #define TFT_DC D2
// Arduino Nano ESP 32
// #define TFT_CS 10
// #define TFT_RST 9
// #define TFT_DC 8
// ESP32-C6
// #define TFT_CS 18
// #define TFT_RST 3
// #define TFT_DC 2
// ESP32-WROOM
// #define TFT_CS 5
// #define TFT_RST 4
// #define TFT_DC 2
ILI9486_SPI tft(TFT_CS, TFT_DC, TFT_RST);
// Farben
#define SCHWARZ 0x0000
#define WEISS 0xFFFF
#define BLAU 0x001F
#define ROT 0xF800
#define GRUEN 0x07E0
#define CYAN 0x07FF
#define MAGENTA 0xF81F
#define GELB 0xFFE0
#define BRAUN 0x9A60
#define GRAU 0x7BEF
#define GRUENGELB 0xB7E0
#define DUNKELCYAN 0x03EF
#define ORANGE 0xFDA0
#define PINK 0xFE19
#define BORDEAUX 0xA000
#define HELLBLAU 0x867D
#define VIOLETT 0x915C
#define SILBER 0xC618
#define GOLD 0xFEA0
void setup()
{
tft.setSpiKludge(false);
// TFT starten
tft.init();
// Rotation anpassen
tft.setRotation(0);
// wenn die Farben invertiert sind
// weiß = schwarz, schwarz = weiss ...
// // entfernen
// tft.invertDisplay(1);
// schwarzer Hintergrund
tft.fillScreen(SCHWARZ);
// interne Textdarstellung
tft.setTextSize(1);
tft.setCursor(1, 5);
tft.setTextColor(BLAU);
tft.print("Text");
delay(500);
tft.setTextSize(3);
tft.setCursor(1, 40);
tft.setTextColor(GRUEN);
tft.print("Text");
delay(500);
tft.setTextSize(5);
tft.setCursor(1, 70);
tft.setTextColor(ROT);
tft.print("Text");
tft.setTextSize(7);
tft.setCursor(1, 120);
tft.setTextColor(ORANGE);
tft.print("Text");
delay(2000);
// Sonderzeichen darstellen
tft.fillScreen(SCHWARZ);
tft.setTextColor(WEISS);
tft.setCursor(1, 20);
tft.setTextSize(4);
// Großstädte
tft.println();
tft.print("Gro");
tft.write(0xe);
tft.print("st");
tft.write(0x84);
tft.print("dte");
// Düsseldorf
tft.println();
tft.print("D");
tft.write(0x81);
tft.print("sseldorf");
// Köln
tft.println();
tft.print("K");
tft.write(0x94);
tft.println("ln");
tft.println();
tft.println("Temperatur");
tft.print("20");
tft.write(0xf7);
tft.print("C");
delay(2000);
// zufällige Pixel
tft.fillScreen(SCHWARZ);
for (int i = 0; i < 700; i++)
{
int PixelX = random(1, tft.width());
int PixelY = random(1, tft.height());
tft.drawPixel(PixelX, PixelY, tft.color565(random(255),random(255),random(255)));
delay(5);
}
delay(2000);
// Linien ziehen
tft.fillScreen(SCHWARZ);
for (int i = 1; i < tft.height(); i+=10)
{
tft.drawLine(1, i, tft.width(), i, ORANGE);
}
delay(2000);
// Kreise vom Mittelpunkt zeichnen
tft.fillScreen(SCHWARZ);
for (int i = 1; i < tft.width() / 2; i+=10)
{
tft.fillCircle(tft.width() / 2, tft.height() / 2, tft.width() / 2 - i, tft.color565(random(255),random(255),random(255)));
delay(50);
}
delay(2000);
// Rechtecke zeichnen
tft.fillScreen(SCHWARZ);
for (int i = 1; i < tft.width(); i+=10)
{
tft.drawRect(tft.width() / 2 - i / 2, tft.height() / 2 - i / 2 , i, i, tft.color565(random(255),random(255),random(255)));
}
delay(2000);
// ausgefüllte Rechtecke zeichnen
tft.fillScreen(SCHWARZ);
for (int i = 1; i < tft.width() / 2; i+=10)
{
tft.fillRect(i, i, i, i, tft.color565(random(ROT),random(GRUEN),random(BLAU)));
delay(50);
}
delay(2000);
// Dreiecke
tft.fillScreen(SCHWARZ);
for (int i = 1; i <tft.width(); i+=10)
{
tft.fillTriangle(i, i, 100, 100, 1, tft.width(), tft.color565(random(255),random(255),random(255)));
delay(50);
}
}
void loop()
{
// nichts zu tun, das Programm läuft nur einmal
}
Sonderzeichen anzeigen
Die Standardschriften können keine Umlaute und Sonderzeichen anzeigen, sie müssen als hexadezimaler oder dezimaler Code eingegeben werden.
Zeichen | Hex-Code | Dezimal-Code |
---|---|---|
ä | 0×84 | 132 |
ö | 0×94 | 148 |
ü | 0×81 | 129 |
Ä | 0x8e | 142 |
Ö | 0×99 | 153 |
Ü | 0x9a | 154 |
ß | 0xe0 | 224 |
° | 0xf7 | 247 |
α | 0xdf | 223 |
π | 0xe2 | 226 |
Ω | 0xe9 | 233 |
Σ | 0xe3 | 227 |
€ | 0xed | 237 |
| | 0xad | 173 |
tft.write(0x84); // ä 132
tft.write(0x94); // ö 148
tft.write(0x81); // ü 129
tft.write(0x8e); // Ä 142
tft.write(0x99); // Ö 153
tft.write(0x9a); // Ü 154
tft.write(0xe0); // ß 224
tft.println();
tft.write(0xdf); // α 223
tft.write(0xe2); // π 226
tft.write(0xe3); // Σ 227
tft.write(0xe9); // Ω 233
tft.write(0xad); // | 173
tft.write(0xae); // Doppelpfeil links 174
tft.write(0xaf); // Doppelpfeil rechts 175
tft.write(0xf7); // ° 247
tft.write(0xed); // € 237
// Beispiele
// Großstädte
tft.println();
tft.print("Gro");
tft.write(0xe);
tft.print("st");
tft.write(0x84);
tft.print("dte");
// Düsseldorf
tft.println();
tft.print("D");
tft.write(0x81);
tft.print("sseldorf");
// Köln
tft.println();
tft.print("K");
tft.write(0x94);
tft.print("ln");
Wenn du den dezimalen Code verwenden willst:
tft.write(char(132)); // ä
tft.write(char(148)); // ö
tft.write(char(129)); // ü
Alle Sonderzeichen anzeigen:
for (int i = 128; i < 256; i++)
{
tft.write(char(i));
}
Schriften mit der Bibliothek Adafruit_GFX
Die Bibliothek Adafruit_GFX bietet auch verschiedene Schriften an. Sie befinden sich im Ordner libraries/Adafruit_GFX_Library/Fonts. Leider bieten sie nur den einfachen ASCII-Zeichensatz, Umlaute und Sonderzeichen fehlen.
Im Kopf des Programms müssen die verwendeten Schriften eingebunden werden, setFont definiert die entsprechende Schriftart.

Beispiel:
#include "Adafruit_ILI9341.h"
// alle Schriftarten einbinden
#include "Fonts/FreeMono9pt7b.h"
#include "Fonts/FreeMono12pt7b.h"
#include "Fonts/FreeMono18pt7b.h"
#include "Fonts/FreeMono24pt7b.h"
#include "Fonts/FreeMonoBold9pt7b.h"
#include "Fonts/FreeMonoBold12pt7b.h"
#include "Fonts/FreeMonoBold18pt7b.h"
#include "Fonts/FreeMonoBold24pt7b.h"
#include "Fonts/FreeMonoBoldOblique9pt7b.h"
#include "Fonts/FreeMonoBoldOblique12pt7b.h"
#include "Fonts/FreeMonoBoldOblique18pt7b.h"
#include "Fonts/FreeMonoBoldOblique24pt7b.h"
#include "Fonts/FreeMonoOblique9pt7b.h"
#include "Fonts/FreeMonoOblique12pt7b.h"
#include "Fonts/FreeMonoOblique18pt7b.h"
#include "Fonts/FreeMonoOblique24pt7b.h"
#include "Fonts/FreeSans9pt7b.h"
#include "Fonts/FreeSans12pt7b.h"
#include "Fonts/FreeSans18pt7b.h"
#include "Fonts/FreeSans24pt7b.h"
#include "Fonts/FreeSansBold9pt7b.h"
#include "Fonts/FreeSansBold12pt7b.h"
#include "Fonts/FreeSansBold18pt7b.h"
#include "Fonts/FreeSansBold24pt7b.h"
#include "Fonts/FreeSerif9pt7b.h"
#include "Fonts/FreeSerif12pt7b.h"
#include "Fonts/FreeSerif18pt7b.h"
#include "Fonts/FreeSerif24pt7b.h"
#include "Fonts/FreeSerifBold9pt7b.h"
#include "Fonts/FreeSerifBold12pt7b.h"
#include "Fonts/FreeSerifBold18pt7b.h"
#include "Fonts/FreeSerifBold24pt7b.h"
// Wemos D1 Mini
// #define TFT_CS D8
// #define TFT_RST D1
// #define TFT_DC D2
// XIAO
// #define TFT_CS D7
// #define TFT_RST D1
// #define TFT_DC D2
// Arduino Nano ESP 32
// #define TFT_CS 10
// #define TFT_RST 9
// #define TFT_DC 8
// SPI-Pins ESP32-C6
// #define TFT_CS 18
// #define TFT_RST 3
// #define TFT_DC 2
// ESP32-WROOM
// #define TFT_CS 5
// #define TFT_RST 4
// #define TFT_DC 2
Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC, TFT_RST);
// Farben
#define SCHWARZ 0x0000
#define WEISS 0xFFFF
#define BLAU 0x001F
#define ROT 0xF800
#define GRUEN 0x07E0
#define CYAN 0x07FF
#define MAGENTA 0xF81F
#define GELB 0xFFE0
#define BRAUN 0x9A60
#define GRAU 0x7BEF
#define GRUENGELB 0xB7E0
#define DUNKELCYAN 0x03EF
#define ORANGE 0xFDA0
#define PINK 0xFE19
#define BORDEAUX 0xA000
#define HELLBLAU 0x867D
#define VIOLETT 0x915C
#define SILBER 0xC618
#define GOLD 0xFEA0
void setup()
{
tft.begin();
tft.fillScreen(SCHWARZ);
tft.setTextColor(WEISS);
tft.setFont(&FreeSerif24pt7b);
tft.setCursor(1, 40);
tft.print("Serif 24pt");
tft.setTextColor(BORDEAUX);
tft.setFont(&FreeSans24pt7b);
tft.setCursor(1, 100);
tft.print("Sans 24pt");
tft.setTextColor(PINK);
tft.setFont(&FreeSerif18pt7b);
tft.setCursor(1, 140);
tft.print("Serif 18pt");
tft.setTextColor(GRUEN);
tft.setFont(&FreeSans18pt7b);
tft.setCursor(1, 180);
tft.print("Sans 18pt");
tft.setTextColor(MAGENTA);
tft.setFont(&FreeSerif12pt7b);
tft.setCursor(1, 210);
tft.print("Serif 12pt");
tft.setTextColor(ROT);
tft.setFont(&FreeSans12pt7b);
tft.setCursor(1, 240);
tft.print("Sans 12pt");
tft.setTextColor(ORANGE);
tft.setFont(&FreeSerif9pt7b);
tft.setCursor(1, 270);
tft.print("Serif 9pt");
tft.setTextColor(GELB);
tft.setFont(&FreeSans9pt7b);
tft.setCursor(1, 300);
tft.print("Sans 9pt");
}
void loop()
{
// bleibt leer, Programm läuft nur einmal
}
Schriften erstellen
Auf der Seite https://rop.nl/truetype2gfx/ kannst du von den verfügbaren freien Schriftarten neue Schriftgrößen erstellen. Allerdings verwenden diese Schriften auch nur den einfachen ASCII-Zeichensatz.

Die neu erstellte Schrift befindet sich anschließend in deinem Download-Ordner. Jetzt musst du sie noch in den Ordner
Arduino/libraries/Adafruit_GFX_Library/Fonts
kopieren.
So sieht es auf einem TFT mit 320×240 Pixeln aus:

#include "Adafruit_ILI9341.h"
#include "Fonts/FreeSans60pt7b.h"
// Wemos D1 Mini
// #define TFT_CS D8
// #define TFT_RST D1
// #define TFT_DC D2
// XIAO
// #define TFT_CS D7
// #define TFT_RST D1
// #define TFT_DC D2
// Arduino Nano ESP 32
// #define TFT_CS 10
// #define TFT_RST 9
// #define TFT_DC 8
// ESP32-C6
// #define TFT_CS 18
// #define TFT_RST 3
// #define TFT_DC 2
// ESP32-WROOM
// #define TFT_CS 5
// #define TFT_RST 4
// #define TFT_DC 2
Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC, TFT_RST);
#define SCHWARZ 0x0000 // dezimal 0
#define WEISS 0xFFFF // dezimal 65535
void setup()
{
tft.begin();
tft.setRotation(1);
tft.fillScreen(SCHWARZ);
tft.setTextColor(WEISS);
tft.setFont(&FreeSans60pt7b);
tft.setCursor(1, 100);
tft.print("Sans");
tft.setCursor(1, 200);
tft.println("60pt");
}
void loop()
{
// bleibt leer, Programm läuft nur einmal
}
Zusätzliche Schriften mit der Bibliothek U8g2_for_Adafruit_GFX
Die Bibliothek U8g2_for_Adafruit_GFX Bibliothek bietet eine Vielzahl von Schriften in verschiedenen Größen. Am Namen der Schriftart kannst du ablesen welche ASCII-Zeichen dargestellt werden können.
u8g2_for_AdafruitGFX Zeichensatz
Zeichensatz | Beschreibung |
---|---|
r | ASCII-Zeichen zwischen 30 und 127 enthält alle Zahlen, Groß und Kleinbuchstaben |
f | ASCII-Zeichen zwischen 30 und 255 erweiterter Zeichensatz mit Symbolen und Umlauten |
u | ASCII-Zeichen zwischen 32 und 95 Großbuchstaben |
n | ASCII-Zeichen zwischen 30 und 39 Zahlen und Satzzeichen |


Bitmaps darstellen

Array des Bitmaps erstellen
Bitmaps können nicht direkt auf dem Display dargestellt werden, sie müssen als Array hexadezimaler Werte vorliegen.
Wähle oder erstelle ein Bild mit den maximalen Maßen 200×200 Pixeln. Das Online-Tool 🔗https://javl.github.io/image2cpp/ wandelt das Bild in ein Array um.


Der Speicherplatz des Arduino UNO reicht für das Programm nicht aus.
Das erstellte Array muss in den Kopf des Programms eingefügt werden.
drawBitmap zeigt das Bild an.
Ab Zeile 4 musst du die entsprechenden SPI-Pins des verwendeten Mikrocontrollers auswählen.
#include "Adafruit_ILI9341.h"
#include "U8g2_for_Adafruit_GFX.h"
// Wemos D1 Mini
// #define TFT_CS D8
// #define TFT_RST D1
// #define TFT_DC D2
// XIAO
// #define TFT_CS D7
// #define TFT_RST D1
// #define TFT_DC D2
// Arduino Nano ESP 32
// #define TFT_CS 10
// #define TFT_RST 9
// #define TFT_DC 8
// ESP32-C6
// #define TFT_CS 18
// #define TFT_RST 3
// #define TFT_DC 2
// ESP32-WROOM
// #define TFT_CS 5
// #define TFT_RST 4
// #define TFT_DC 2
// Farben
#define SCHWARZ 0x0000
#define WEISS 0xFFFF
#define BLAU 0x001F
#define ROT 0xF800
#define GRUEN 0x07E0
#define CYAN 0x07FF
#define MAGENTA 0xF81F
#define GELB 0xFFE0
#define BRAUN 0x9A60
#define GRAU 0x7BEF
#define GRUENGELB 0xB7E0
#define DUNKELCYAN 0x03EF
#define ORANGE 0xFDA0
#define PINK 0xFE19
#define BORDEAUX 0xA000
#define HELLBLAU 0x867D
#define VIOLETT 0x915C
#define SILBER 0xC618
#define GOLD 0xFEA0
Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC, TFT_RST);
// Objekt u8g2Schriften
U8G2_FOR_ADAFRUIT_GFX u8g2Schriften;
// Bitmaps
const unsigned char Uhr [] PROGMEM = {
// 'Uhr, 80x80px
0x00, 0x00, 0x00, 0x00, 0x3f, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xff, 0xff,
0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xff, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0xff, 0xff, 0xc0,
0x00, 0x00, 0x00, 0x00, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xff,
0xe0, 0x07, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xfc, 0x00, 0x00, 0x3f, 0xfe, 0x00, 0x00,
0x00, 0x01, 0xff, 0xf0, 0x00, 0x00, 0x07, 0xff, 0x80, 0x00, 0x00, 0x03, 0xff, 0x80, 0x00, 0x00,
0x01, 0xff, 0xc0, 0x00, 0x00, 0x07, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xe0, 0x00, 0x00, 0x0f,
0xfc, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xf0, 0x00, 0x00, 0x1f, 0xf0, 0x00, 0x03, 0xc0, 0x00, 0x0f,
0xf8, 0x00, 0x00, 0x3f, 0xe0, 0x00, 0x03, 0xc0, 0x00, 0x07, 0xfc, 0x00, 0x00, 0x7f, 0xc0, 0x00,
0x01, 0x80, 0x00, 0x03, 0xfe, 0x00, 0x00, 0xff, 0x80, 0x70, 0x00, 0x00, 0x0e, 0x01, 0xff, 0x00,
0x00, 0xff, 0x00, 0x70, 0x00, 0x00, 0x0e, 0x00, 0xff, 0x00, 0x01, 0xfe, 0x00, 0x70, 0x00, 0x00,
0x0e, 0x00, 0x7f, 0x80, 0x03, 0xfc, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x3f, 0xc0, 0x03, 0xf8,
0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x1f, 0xc0, 0x07, 0xf0, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00,
0x0f, 0xe0, 0x07, 0xf0, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x0f, 0xe0, 0x0f, 0xe0, 0x00, 0x00,
0x01, 0x80, 0x00, 0x00, 0x07, 0xf0, 0x0f, 0xc0, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x03, 0xf0,
0x1f, 0xc0, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x03, 0xf8, 0x1f, 0x80, 0xe0, 0x00, 0x01, 0x80,
0x00, 0x03, 0x81, 0xf8, 0x3f, 0x80, 0xe0, 0x00, 0x01, 0x80, 0x00, 0x03, 0x81, 0xfc, 0x3f, 0x80,
0xe0, 0x00, 0x01, 0x80, 0x00, 0x03, 0x81, 0xfc, 0x3f, 0x00, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00,
0x00, 0xfc, 0x7f, 0x00, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0xfe, 0x7e, 0x00, 0x00, 0x00,
0x01, 0x80, 0x00, 0x00, 0x00, 0x7e, 0x7e, 0x00, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x7e,
0x7e, 0x00, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x7e, 0x7e, 0x00, 0x00, 0x00, 0x01, 0x80,
0x00, 0x00, 0x00, 0x7e, 0xfe, 0x00, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x7f, 0xfc, 0x00,
0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x3f, 0xfc, 0x00, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00,
0x00, 0x3f, 0xfc, 0x00, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x3f, 0xfc, 0x0c, 0x00, 0x00,
0x01, 0x80, 0x00, 0x00, 0x30, 0x3f, 0xfc, 0x1c, 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 0x78, 0x3f,
0xfc, 0x1c, 0x00, 0x00, 0x07, 0x80, 0x00, 0x00, 0x78, 0x3f, 0xfc, 0x0c, 0x00, 0x00, 0x1f, 0x80,
0x00, 0x00, 0x30, 0x3f, 0xfc, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xfc, 0x00,
0x00, 0x01, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xfc, 0x00, 0x00, 0x03, 0xe0, 0x00, 0x00, 0x00,
0x00, 0x3f, 0xfe, 0x00, 0x00, 0x0f, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x7e, 0x00, 0x00, 0x3f,
0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x7e, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e,
0x7e, 0x00, 0x01, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x7e, 0x00, 0x07, 0xe0, 0x00, 0x00,
0x00, 0x00, 0x00, 0x7e, 0x7f, 0x00, 0x07, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x3f, 0x00,
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x3f, 0x01, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x03,
0x80, 0xfc, 0x3f, 0x81, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x03, 0x81, 0xfc, 0x1f, 0x80, 0xc0, 0x00,
0x00, 0x00, 0x00, 0x03, 0x81, 0xf8, 0x1f, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xf8,
0x0f, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xf0, 0x0f, 0xe0, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x07, 0xf0, 0x07, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xe0, 0x07, 0xf0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xe0, 0x03, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x1f, 0xc0, 0x03, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc0, 0x01, 0xfe, 0x00, 0x70,
0x00, 0x00, 0x0e, 0x00, 0x7f, 0x80, 0x00, 0xff, 0x00, 0x70, 0x00, 0x00, 0x0e, 0x00, 0xff, 0x00,
0x00, 0xff, 0x80, 0x70, 0x00, 0x00, 0x0e, 0x01, 0xff, 0x00, 0x00, 0x7f, 0xc0, 0x00, 0x01, 0x80,
0x00, 0x03, 0xfe, 0x00, 0x00, 0x3f, 0xe0, 0x00, 0x03, 0xc0, 0x00, 0x07, 0xfc, 0x00, 0x00, 0x1f,
0xf0, 0x00, 0x03, 0xc0, 0x00, 0x0f, 0xf8, 0x00, 0x00, 0x0f, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x3f,
0xf0, 0x00, 0x00, 0x07, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xe0, 0x00, 0x00, 0x03, 0xff, 0x80,
0x00, 0x00, 0x01, 0xff, 0xc0, 0x00, 0x00, 0x01, 0xff, 0xf0, 0x00, 0x00, 0x07, 0xff, 0x80, 0x00,
0x00, 0x00, 0x7f, 0xfc, 0x00, 0x00, 0x3f, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xff, 0xe0, 0x07,
0xff, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00,
0x03, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xff, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07,
0xff, 0xff, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xfc, 0x00, 0x00, 0x00, 0x00
};
const unsigned char Arduino [] PROGMEM = {
// 'Arduino, 100x72px
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xff, 0xfd, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xf8, 0x00, 0x00, 0x0f, 0xff, 0xf8, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc,
0x00, 0x00, 0x0f, 0xff, 0xf8, 0x7c, 0x00, 0x00, 0x01, 0xe0, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x0f,
0xff, 0xf8, 0xfd, 0x24, 0x01, 0x25, 0xc0, 0x24, 0x90, 0x0c, 0x00, 0x00, 0x0f, 0xff, 0xff, 0xfd,
0x20, 0x00, 0x25, 0xc0, 0x04, 0x80, 0x0c, 0x00, 0x00, 0x0f, 0xff, 0xff, 0xfc, 0x00, 0x00, 0x01,
0xe0, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xfc, 0x00, 0x00, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x00,
0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x00, 0x0e, 0xff, 0xe0,
0x87, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x00, 0x0c, 0x7f, 0xf1, 0x87, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xfc, 0x00, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xc1, 0xff, 0x1f, 0xc7, 0xff, 0xff, 0xfc, 0x00,
0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x07, 0x01, 0xff, 0xff, 0xfc, 0x00, 0x1f, 0xff, 0xff,
0xfd, 0x5f, 0xc3, 0xfc, 0xf2, 0x39, 0xff, 0xff, 0xfc, 0x00, 0x1f, 0xff, 0xff, 0xf0, 0x07, 0xc3,
0xfd, 0xf8, 0xfc, 0xff, 0xff, 0xfc, 0x00, 0x1f, 0xff, 0xff, 0xf0, 0x03, 0xff, 0xf9, 0x9c, 0xc4,
0xff, 0xff, 0xfc, 0x00, 0x1f, 0xff, 0xff, 0xe0, 0x03, 0xc1, 0xf9, 0xf8, 0xec, 0xff, 0xff, 0xff,
0x00, 0x1f, 0xff, 0xff, 0xf0, 0x03, 0xff, 0xfc, 0xf0, 0x7c, 0xff, 0xff, 0xff, 0x80, 0x1f, 0xff,
0xff, 0xe0, 0x03, 0xc3, 0xfc, 0x43, 0x11, 0xff, 0xff, 0xff, 0x80, 0x1f, 0xff, 0xff, 0xf0, 0x03,
0xc3, 0xfe, 0x0f, 0x83, 0xf0, 0xc3, 0xfb, 0x80, 0x1f, 0xff, 0xff, 0xe0, 0x03, 0xff, 0xff, 0xff,
0xff, 0xf0, 0xc3, 0xf9, 0x80, 0x1f, 0xff, 0xff, 0xf0, 0x03, 0xc1, 0xff, 0xff, 0xff, 0xff, 0xff,
0xf9, 0x80, 0x1f, 0xff, 0xff, 0xf0, 0x07, 0xe7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0x1f,
0xff, 0xff, 0xfd, 0x5f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0x1f, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0x00, 0x08, 0x3f, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0x00, 0x0c, 0x7f, 0xf0, 0xfd, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0x81, 0x80, 0x00, 0x0f, 0xff, 0xe0, 0x39, 0xc1, 0xff, 0xff, 0xff, 0xff, 0xff, 0x85, 0x80,
0x00, 0x0f, 0xff, 0xc0, 0x39, 0xff, 0xf8, 0x3d, 0xb6, 0xe4, 0x27, 0x83, 0x80, 0x00, 0x0f, 0xff,
0xe0, 0x79, 0xc3, 0xfc, 0x3f, 0xff, 0xe0, 0x07, 0x81, 0x80, 0x00, 0x0f, 0xff, 0xff, 0xff, 0xc3,
0xff, 0xff, 0xff, 0xfb, 0xcf, 0xa5, 0x80, 0x00, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x00, 0xff,
0xfb, 0xcf, 0x81, 0x80, 0x00, 0x0f, 0xff, 0xf3, 0x1f, 0xc1, 0xf8, 0x00, 0x7f, 0xfb, 0xcf, 0x81,
0x80, 0x00, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x7f, 0xf1, 0x8f, 0xa5, 0x80, 0x00, 0x0f,
0xff, 0xff, 0xff, 0xc3, 0xf8, 0x00, 0x7f, 0xe4, 0x27, 0x81, 0x80, 0x00, 0x0f, 0xff, 0xff, 0xff,
0xc3, 0xf8, 0x00, 0xe0, 0xec, 0x37, 0xff, 0x80, 0x00, 0x0f, 0xff, 0xfc, 0x03, 0xff, 0xff, 0xff,
0xf0, 0xff, 0xff, 0xff, 0x80, 0x00, 0x0f, 0xff, 0xfc, 0x03, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0x80, 0x00, 0x0f, 0xff, 0xf8, 0x01, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0x00,
0x0f, 0x00, 0xfc, 0x03, 0xff, 0x5a, 0xad, 0x5a, 0xad, 0x5a, 0xff, 0x80, 0x00, 0x0e, 0x00, 0x18,
0x01, 0xff, 0x52, 0xa1, 0x42, 0xa1, 0x42, 0xff, 0x80, 0x00, 0x0c, 0x00, 0x1c, 0x03, 0xfe, 0x00,
0x00, 0x00, 0x00, 0x00, 0x7f, 0x80, 0x00, 0x0c, 0x00, 0x78, 0x01, 0xfe, 0x00, 0x00, 0x00, 0x00,
0x00, 0x7f, 0x80, 0x00, 0x0c, 0x00, 0x1c, 0x03, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x80,
0x00, 0x0c, 0x00, 0x1f, 0xff, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x80, 0x00, 0x0c, 0x00,
0x7f, 0xff, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x80, 0x00, 0x0c, 0x00, 0x1f, 0xff, 0xfe,
0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x80, 0x00, 0x0f, 0x00, 0x1f, 0xff, 0xfe, 0x00, 0x00, 0x00,
0x00, 0x00, 0x7f, 0x80, 0x00, 0x0f, 0xff, 0xf8, 0x07, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f,
0x80, 0x00, 0x0f, 0xff, 0xf8, 0x07, 0xff, 0x52, 0xa5, 0x52, 0xa5, 0x42, 0xff, 0x80, 0x00, 0xff,
0xff, 0xb8, 0x07, 0xff, 0x5e, 0xbf, 0x7e, 0xbd, 0x7e, 0xff, 0x80, 0x00, 0xff, 0xff, 0xfc, 0x07,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0x80, 0x00, 0xff, 0xff, 0x8f, 0x07, 0xc1, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0x80, 0x00, 0xff, 0xff, 0x8e, 0x03, 0x80, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x80, 0x00,
0xff, 0xff, 0x8c, 0x03, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x80, 0x00, 0xff, 0xff, 0x8c,
0x01, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x80, 0x00, 0xff, 0xff, 0xfc, 0x01, 0x00, 0xff,
0xff, 0xff, 0xff, 0xff, 0xfd, 0x80, 0x00, 0xff, 0xff, 0xfc, 0x03, 0x00, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0x80, 0x00, 0xff, 0xff, 0xfe, 0x03, 0x80, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80,
0x00, 0xff, 0xff, 0xff, 0x07, 0x81, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x7f, 0xf0,
0x7f, 0xff, 0xff, 0xe0, 0x00, 0x07, 0x80, 0x00, 0x0e, 0x00, 0x00, 0x0f, 0xf0, 0xff, 0xff, 0xff,
0xe9, 0x24, 0x97, 0xa4, 0x92, 0x2c, 0x00, 0x00, 0x0f, 0xfd, 0xff, 0xff, 0xff, 0xe0, 0x00, 0x07,
0x80, 0x00, 0x0c, 0x00, 0x00, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
const unsigned char Laptop [] PROGMEM = {
// 'Laptop, 85x85px
0x00, 0x00, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x3f, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xf8, 0x00, 0x00, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x3f, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xf8, 0x00, 0x00, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x3f,
0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x3f, 0x80, 0x00, 0x00, 0x00, 0x00,
0x00, 0x07, 0xf8, 0x00, 0x00, 0x3f, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xf8, 0x00, 0x00,
0x3f, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xf8, 0x00, 0x00, 0x3f, 0x80, 0x00, 0x00, 0x00,
0x00, 0x00, 0x07, 0xf8, 0x00, 0x00, 0x3f, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xf8, 0x00,
0x00, 0x3f, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xf8, 0x00, 0x00, 0x3f, 0x80, 0x00, 0x00,
0x00, 0x00, 0x00, 0x07, 0xf8, 0x00, 0x00, 0x3f, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xf8,
0x00, 0x00, 0x3f, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xf8, 0x00, 0x00, 0x3f, 0x80, 0x00,
0x00, 0x00, 0x00, 0x00, 0x07, 0xf8, 0x00, 0x00, 0x3f, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07,
0xf8, 0x00, 0x00, 0x3f, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xf8, 0x00, 0x00, 0x3f, 0x80,
0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xf8, 0x00, 0x00, 0x3f, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
0x07, 0xf8, 0x00, 0x00, 0x3f, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xf8, 0x00, 0x00, 0x3f,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xf8, 0x00, 0x00, 0x3f, 0x80, 0x00, 0x00, 0x00, 0x00,
0x00, 0x07, 0xf8, 0x00, 0x00, 0x3f, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xf8, 0x00, 0x00,
0x3f, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xf8, 0x00, 0x00, 0x3f, 0x80, 0x00, 0x00, 0x00,
0x00, 0x00, 0x07, 0xf8, 0x00, 0x00, 0x3f, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xf8, 0x00,
0x00, 0x3f, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xf8, 0x00, 0x00, 0x3f, 0x80, 0x00, 0x00,
0x00, 0x00, 0x00, 0x07, 0xf8, 0x00, 0x00, 0x3f, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xf8,
0x00, 0x00, 0x3f, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xf8, 0x00, 0x00, 0x3f, 0x80, 0x00,
0x00, 0x00, 0x00, 0x00, 0x07, 0xf8, 0x00, 0x00, 0x3f, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07,
0xf8, 0x00, 0x00, 0x3f, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xf8, 0x00, 0x00, 0x3f, 0x80,
0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xf8, 0x00, 0x00, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xf8, 0x00, 0x00, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x3f,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xf8, 0x00, 0x00, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00,
0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x3f, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00,
0x00, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x3f, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x37, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xb8,
0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x60, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x60, 0x00, 0x00, 0xcf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x60, 0x00, 0x01, 0x8c, 0xf9,
0xe7, 0x8f, 0x3c, 0xf9, 0xe3, 0xce, 0xc0, 0x00, 0x01, 0x98, 0xf1, 0xc3, 0x0e, 0x38, 0x71, 0xe3,
0x8c, 0xc0, 0x00, 0x03, 0x18, 0xe3, 0xc7, 0x1e, 0x38, 0xe1, 0xc3, 0x0d, 0x80, 0x00, 0x03, 0x3f,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf9, 0x80, 0x00, 0x06, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xfb, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0c,
0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x06, 0x00, 0x00, 0x0c, 0x1f, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0x06, 0x00, 0x00, 0x18, 0x18, 0xe1, 0xc7, 0x1c, 0x38, 0xe1, 0xc6, 0x0c, 0x00, 0x00,
0x18, 0x10, 0xe3, 0x86, 0x1c, 0x78, 0xe3, 0x86, 0x0c, 0x00, 0x00, 0x30, 0x31, 0xe3, 0x8f, 0x3c,
0x79, 0xe3, 0x8c, 0x18, 0x00, 0x00, 0x30, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x18, 0x00,
0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0xe7, 0xf3, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x60,
0x00, 0x00, 0xc6, 0x36, 0x00, 0x00, 0x00, 0x01, 0xe3, 0xc6, 0x60, 0x00, 0x00, 0xcc, 0x36, 0x00,
0x00, 0x00, 0x01, 0xe3, 0x8c, 0xc0, 0x00, 0x01, 0x8c, 0x6c, 0x00, 0x00, 0x00, 0x01, 0xc3, 0x8c,
0xc0, 0x00, 0x01, 0x8f, 0xef, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf9, 0x80, 0x00, 0x03, 0x0f, 0xcf,
0xff, 0xff, 0xff, 0xff, 0xff, 0xf9, 0x80, 0x00, 0x03, 0x00, 0x00, 0x03, 0xff, 0xff, 0x80, 0x00,
0x03, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x00, 0x01, 0x80, 0x00, 0x03, 0x00, 0x00, 0x06, 0x00,
0x00, 0x06, 0x00, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x0c, 0x00, 0x03, 0x00,
0x00, 0x06, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x0c, 0x00, 0x02, 0x00, 0x00, 0x06, 0x00, 0x00, 0x18,
0x00, 0x00, 0x08, 0x00, 0x06, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x18, 0x00, 0x00, 0x18, 0x00, 0x04,
0x00, 0x00, 0x0c, 0x00, 0x00, 0x30, 0x00, 0x00, 0x18, 0x00, 0x0c, 0x00, 0x00, 0x18, 0x00, 0x00,
0x30, 0x00, 0x00, 0x3f, 0xff, 0xfc, 0x00, 0x00, 0x18, 0x00, 0x00, 0x60, 0x00, 0x00, 0x1f, 0xff,
0xf8, 0x00, 0x00, 0x30, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00,
0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xe0, 0x00, 0x00
};
const unsigned char Kalender [] PROGMEM = {
// 'Kalender, 76x90px
0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x7f, 0xff, 0xff, 0xff, 0xf9, 0xff,
0xff, 0xff, 0xff, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xff, 0xff,
0xff, 0xff, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0,
0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x30, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0xc0, 0x1f,
0xc0, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x80, 0x30, 0xc0, 0x3f, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x7f,
0xc0, 0x30, 0xc0, 0x3f, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xc0, 0x30, 0xc0, 0x3f, 0xe0, 0x00,
0x00, 0x00, 0x00, 0x7f, 0xc0, 0x30, 0xc0, 0x3f, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xc0, 0x30,
0xc0, 0x3f, 0xe0, 0x07, 0xff, 0xfe, 0x00, 0x7f, 0xc0, 0x30, 0xc0, 0x3f, 0xe0, 0x07, 0xff, 0xfe,
0x00, 0x7f, 0xc0, 0x30, 0xc0, 0x3f, 0xe0, 0x07, 0xff, 0xfe, 0x00, 0x7f, 0xc0, 0x30, 0xc0, 0x1f,
0xc0, 0x07, 0xff, 0xfe, 0x00, 0x3f, 0x80, 0x30, 0xc0, 0x00, 0x00, 0x07, 0xff, 0xfe, 0x00, 0x00,
0x00, 0x30, 0xc0, 0x00, 0x00, 0x07, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x30, 0xc0, 0x00, 0x00, 0x0f,
0x80, 0x00, 0x00, 0x00, 0x00, 0x30, 0xc0, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0x00, 0x00, 0x30,
0xc0, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0x00, 0x00, 0x30, 0xc0, 0x00, 0x00, 0x0f, 0x80, 0x00,
0x00, 0x00, 0x00, 0x30, 0xc0, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0x00, 0x00, 0x30, 0xc0, 0x00,
0x00, 0x0f, 0x87, 0x00, 0x00, 0x00, 0x00, 0x30, 0xc0, 0x00, 0x00, 0x0f, 0xff, 0xe0, 0x00, 0x00,
0x00, 0x30, 0xc0, 0x00, 0x00, 0x1f, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x30, 0xc0, 0x00, 0x00, 0x1f,
0xff, 0xfc, 0x00, 0x00, 0x00, 0x30, 0xc0, 0x00, 0x00, 0x1f, 0xff, 0xfe, 0x00, 0x00, 0x00, 0x30,
0xc0, 0x00, 0x00, 0x1f, 0xe3, 0xfe, 0x00, 0x00, 0x00, 0x30, 0xc0, 0x00, 0x00, 0x1f, 0x80, 0xff,
0x00, 0x00, 0x00, 0x30, 0xc0, 0x00, 0x00, 0x0f, 0x80, 0x7f, 0x00, 0x00, 0x00, 0x30, 0xc0, 0x00,
0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x30, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00,
0x00, 0x30, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x80, 0x00, 0x00, 0x30, 0xc0, 0x00, 0x00, 0x00,
0x00, 0x3f, 0x80, 0x00, 0x00, 0x30, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x30,
0xc0, 0x00, 0x00, 0x1f, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x30, 0xc0, 0x00, 0x00, 0x3f, 0x00, 0x3f,
0x00, 0x00, 0x00, 0x30, 0xc0, 0x00, 0x00, 0x3f, 0x80, 0x7f, 0x00, 0x00, 0x00, 0x30, 0xc0, 0x00,
0x00, 0x3f, 0x80, 0x7e, 0x00, 0x00, 0x00, 0x30, 0xc0, 0x00, 0x00, 0x1f, 0xc1, 0xfe, 0x00, 0x00,
0x00, 0x30, 0xc0, 0x00, 0x00, 0x1f, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x30, 0xc0, 0x00, 0x00, 0x0f,
0xff, 0xfc, 0x00, 0x00, 0x00, 0x30, 0xc0, 0x00, 0x00, 0x07, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x30,
0xc0, 0x00, 0x00, 0x01, 0xff, 0xe0, 0x00, 0x00, 0x00, 0x30, 0xc0, 0x00, 0x00, 0x00, 0x7f, 0x00,
0x00, 0x00, 0x00, 0x30, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0xc0, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x30, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0xc0, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30,
0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x30, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0xc0, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x30, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0xc0, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30,
0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x30, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0xc0, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x30, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0xe0, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0,
0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xc0
};
void setup()
{
// Schriften von u8g2 tft zuordnen
u8g2Schriften.begin(tft);
// Zufallsgenerator starten
randomSeed(analogRead(A0));
Serial.begin(9600);
delay(500);
Serial.println("Bildschirm: " + String(tft.height()) + " x " + String(tft.width()));
// TFT starten
tft.begin();
// Rotation anpassen
tft.setRotation(2);
// schwarzer Hintergrund
tft.fillScreen(SCHWARZ);
// interne Textdarstellung
tft.setTextSize(1);
tft.setCursor(1, 5);
tft.setTextColor(BLAU);
tft.print("Text");
delay(500);
tft.setTextSize(3);
tft.setCursor(1, 40);
tft.setTextColor(GRUEN);
tft.print("Text");
delay(500);
tft.setTextSize(5);
tft.setCursor(1, 70);
tft.setTextColor(ROT);
tft.print("Text");
delay(500);
tft.setTextSize(7);
tft.setCursor(1, 120);
tft.setTextColor(GELB);
tft.print("Text");
delay(500);
tft.setTextSize(9);
tft.setCursor(1, 200);
tft.setTextColor(GRAU);
tft.print("Text");
delay(2000);
// Textdarstellung mit u8g2
tft.fillScreen(SCHWARZ);
u8g2Schriften.setForegroundColor(BLAU);
u8g2Schriften.setBackgroundColor(SCHWARZ);
u8g2Schriften.setCursor(1, 30);
u8g2Schriften.setFont(u8g2_font_helvB24_tf);
u8g2Schriften.print("Text");
delay(500);
u8g2Schriften.setForegroundColor(GRUEN);
u8g2Schriften.setCursor(1, 70);
u8g2Schriften.setFont(u8g2_font_fub30_tf);
u8g2Schriften.print("Text");
delay(500);
u8g2Schriften.setForegroundColor(CYAN);
u8g2Schriften.setCursor(1, 120);
u8g2Schriften.setFont(u8g2_font_inb38_mf);
u8g2Schriften.print("Text");
delay(500);
u8g2Schriften.setForegroundColor(PINK);
u8g2Schriften.setCursor(1, 190);
u8g2Schriften.setFont(u8g2_font_fub42_tr);
u8g2Schriften.print("Text");
delay(500);
u8g2Schriften.setForegroundColor(BLAU);
u8g2Schriften.setCursor(1, 280);
u8g2Schriften.setFont(u8g2_font_logisoso58_tf);
u8g2Schriften.print("Text");
delay(2000);
// zufällige Pixel
tft.fillScreen(SCHWARZ);
for (int i = 0; i < 700; i++)
{
int PixelX = random(1, tft.width());
int PixelY = random(1, tft.height());
tft.drawPixel(PixelX, PixelY, tft.color565(random(255),random(255),random(255)));
delay(5);
}
delay(2000);
// Linien ziehen
tft.fillScreen(SCHWARZ);
for (int i = 1; i < tft.height(); i+=10)
{
tft.drawLine(1, i, tft.width(), i, ORANGE);
}
delay(2000);
// Kreise vom Mittelpunkt zeichnen
tft.fillScreen(SCHWARZ);
for (int i = 1; i < tft.width() / 2; i+=10)
{
tft.fillCircle(tft.width() / 2, tft.height() / 2, tft.width() / 2 - i, tft.color565(random(255),random(255),random(255)));
delay(50);
}
delay(2000);
// Rechtecke zeichnen
tft.fillScreen(SCHWARZ);
for (int i = 1; i < tft.width(); i+=10)
{
tft.drawRect(tft.width() / 2 - i / 2, tft.height() / 2 - i / 2 , i, i, tft.color565(random(255),random(255),random(255)));
}
delay(2000);
// ausgefüllte Rechtecke zeichnen
tft.fillScreen(SCHWARZ);
for (int i = 1; i < tft.width() / 2; i+=10)
{
tft.fillRect(i, i, i, i, tft.color565(random(ROT),random(GRUEN),random(BLAU)));
delay(50);
}
delay(2000);
// Dreiecke
tft.fillScreen(SCHWARZ);
for (int i = 1; i <tft.width(); i+=10)
{
tft.fillTriangle(i, i, 100, 100, 1, tft.width(), tft.color565(random(255),random(255),random(255)));
delay(50);
}
delay(2000);
// Bitmaps anzeigen
tft.fillScreen(SCHWARZ);
tft.drawBitmap(20, 1, Uhr, 80, 80, WEISS);
tft.drawBitmap(150, 1, Kalender, 75, 90, WEISS);
tft.drawBitmap(5, 150, Arduino, 100, 72, WEISS);
tft.drawBitmap(140, 150, Laptop, 85, 85, WEISS);
}
void loop()
{
// nichts zu tun, das Programm
// läuft nur einmal
}
GFXcanvas - Flackern des TFTs vermeiden
Soll ein schnell wechselnder Text an der gleichen Position dargestellt werden, gibt es zwei Probleme:
- der geänderte Text ist länger oder kürzer als der vorherige, dadurch überlappen sich die Buchstaben
- der neue Text verursacht ein Flackern des TFTs
Das erste Problem lässt sich lösen indem der bisherige Text durch ein ausgefülltes Rechteck "gelöscht" wird. Das verhindert allerdings nicht das Flackern des TFTs.
Das Flackern lässt sich durch Canvas beseitigen. Hierbei wird ein Bild der darzustellenden Daten im Speicher angelegt, auf Anforderung wird dieses Bild auf dem TFT dargestellt.
Im Film wird der blau dargestellte Bereich mit GFXcanvas erzeugt, im roten Bereich wird der Text zunächst durch ein rotes Rechteck "gelöscht" und anschließend neu geschrieben. Als Text wird die mit ⇒millis() gemessene Zeit, die seit dem Start des Programms vergangen ist, dargestellt.
Man kann den Unterschied gut erkennen.
Jedes Objekt vom Typ GFXcanvas1 benötigt pro ein Bit pro Pixel. Wie im Beispiel eines Bereichs mit 240×150 Pixeln sind das 36.000 Bits, das entspricht 4.500 Bytes oder 4,5 kiloBytes. Der Speicherplatz eines Arduino UNO R3 reicht hierfür nicht aus.
// Display mit 320x240 Pixeln
#include "Adafruit_ILI9341.h"
// Wemos D1 Mini
// #define TFT_CS D8
// #define TFT_RST D1
// #define TFT_DC D2
// XIAO
// #define TFT_CS D7
// #define TFT_RST D1
// #define TFT_DC D2
// Arduino Nano ESP 32
// #define TFT_CS 10
// #define TFT_RST 9
// #define TFT_DC 8
// ESP32-C6
// #define TFT_CS 18
// #define TFT_RST 3
// #define TFT_DC 2
// ESP32-WROOM
// #define TFT_CS 5
// #define TFT_RST 4
// #define TFT_DC 2
Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC, TFT_RST);
// 1-Bit Canvas definieren
GFXcanvas1 Bereich(240, 150);
void setup()
{
// TFT starten
tft.begin();
// wenn die Farben invertiert sind
// weiß = schwarz, schwarz = weiss ...
// // entfernen
// tft.invertDisplay(1);
// schwarzer Hintergrund
tft.fillScreen(0x0000);
// Text darf nicht über den Rand fließen
Bereich.setTextWrap(false);
tft.setTextWrap(false);
}
void loop()
{
// Canvas erstellen
Bereich.fillScreen(0x0000);
Bereich.setCursor(1, 40);
Bereich.setTextSize(3);
Bereich.print("Millisekunden:");
Bereich.setCursor(1, 80);
Bereich.print(millis());
// Canvas als Bild anzeigen
/*
Farben
0x0000 = schwarz
0xFFFF = weiß
0x000F = blau
0xF800 = rot
*/
tft.drawBitmap(0, 0, Bereich.getBuffer(), Bereich.width(), Bereich.height(), 0xFFFF, 0x000F);
// Bereich für den Text "löschen"
tft.fillRect(1, 180, tft.width(), 100, 0xF800);
tft.setCursor(1, 200);
tft.setTextSize(3);
tft.print("Millisekunden:");
tft.setCursor(1, 240);
tft.println(millis());
}
Quellen
- Schriftarten von u8g2
- Adafruit Grafik-Bibliothek
- Online Grafiken in Arrays umwandeln
- Definition der Farben als HEX-Code
Letzte Aktualisierung: