Étape 4 : Affichage de texte sur l’écran tft
evive utilisations ST7735 SPI 1.8" couleur écran TFT et la bibliothèque pour cet écran est disponible sur adafruit. Il s’agit d’une bibliothèque de niveau matériel. Vous pouvez télécharger la bibliothèque depuis github https://github.com/adafruit/Adafruit-ST7735-Library
Quelques exemples sont aussi inclus dans le dépôt github ci-dessus.
Pour afficher du texte, nous avons besoin essentiellement ces trois fonctions-
- setTextColor (textcolor, textbackgroundcolor)
- setCursor (abscisse, ordonnée)
- setTextSize(size)
L’écran est effacé en setBackgroundColor(backgroundcolor).