Bonjour
Je teste un écran TFT 320x240 acheté chez Ali, et j'ai un problème pour afficher du texte.
Lorsque j'utilise le sketch de la bibliothèque Adafruit (Adafruit_ILI9341_AS), ça se passe bien, mais il ne fait qu'afficher en mode console, c'est à dire du texte ligne après ligne.
Moi je voudrais afficher mon texte à une position x,y donnée, et ça n'affiche rien. Pourtant j'utilise les commandes indiquées sur la page Adafruit graphics-primitives
Voici mon code, simplifié au maximum : quelqu'un a-t-il déjà rencontré et résolu ce problème ?
#include <Adafruit_GFX_AS.h> // Core graphics library
#include <Adafruit_ILI9341_AS.h> // Hardware-specific library
#include <SPI.h>
#define _cs 10
#define _dc 9
#define _rst 7
Adafruit_ILI9341_AS tft = Adafruit_ILI9341_AS(_cs, _dc, _rst);
void setup() {
Serial.begin(115200);
Serial.println("OK");
tft.init();
tft.setRotation(1); // Landscape mode
tft.fillScreen(ILI9341_GREEN); // Works OK
// The rest does not !
tft.drawChar(50, 70, 'A', ILI9341_WHITE, ILI9341_BLUE, 3);
tft.drawLine(20, 20, 250, 100, ILI9341_RED);
tft.setCursor(200, 100);
tft.setTextColor(ILI9341_WHITE, ILI9341_BLUE);
tft.setTextSize(3);
tft.print(F("Test"));
Serial.println(F("Test finished"));
}
void loop() {
}
L'écran passe bien en fond vert, la ligne rouge s'affiche, mais de texte nenni...
Le landscape n'est pas en cause, j'ai essayé avec et sans, rien de changé
Merci de votre aide...