I have tried the example ili9341 adafruit library example in Arduino with a TFT ili9341 display and the Xiao ESP32-C6 board. I cannot get the display to work. I checked and re-checked the pin assignments for SPI etc, but nothing. I set serial print statements so I know my sketch is being correctly uploaded. Just to be sure I tried the same sketch with different pin assignments on an old ESP32 devkit board I had and it worked perfectly. Even this simple ili9341 sketch doesn’t work… Any ideas, anyone…
#include <SPI.h>
#include <Adafruit_GFX.h>
#include <Adafruit_ILI9341.h>
// Define pins (change to your chosen CS/DC/RST)
#define TFT_CS 6
#define TFT_DC 7
#define TFT_RST 5
#define TFT_CLK 8
#define TFT_MISO 9
#define TFT_MOSI 10
// Use hardware SPI (MOSI=10, SCK=8)
Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC, TFT_MOSI, TFT_CLK, TFT_RST, TFT_MISO);
void setup() {
Serial.begin(9600);
Serial.println(“Printing it now”);
tft.begin();
tft.fillScreen(ILI9341_BLACK);
tft.setCursor(0, 0);
tft.setTextColor(ILI9341_WHITE);
tft.setTextSize(2);
tft.println(“Hello, XIAO!”);
}
void loop() {}