Hi,
Having problems getting this adafruit TFT 2.4"display working with the above Wemos Mini, using the "Adafruit ILI9341 Breakout and Shield demo example"
code with the pins numbers as shown.
I have had the display working fine with a UNO.
Here's the code (part ), which uploads fine with no errors:
Can anyone tell me where Im going wrong .... Ive played with this for hours... and have also tried using the GPIO numbers too .
board type is Wemos Lolin D1 mini as recommended by Hobby components (whereI bought it). The pinout is from their web site and matches that stenciled on the actual board.
IDE is 1.8.19
/***************************************************
This is our GFX example for the Adafruit ILI9341 Breakout and Shield
----> http://www.adafruit.com/products/1651
Check out the links above for our tutorials and wiring diagrams
These displays use SPI to communicate, 4 or 5 pins are required to
interface (RST is optional)
Adafruit invests time and resources providing this open source code,
please support Adafruit and open-source hardware by purchasing
products from Adafruit!
Written by Limor Fried/Ladyada for Adafruit Industries.
MIT license, all text above must be included in any redistribution
****************************************************/
//#include "SPI.h"
#include "Adafruit_GFX.h"
#include "Adafruit_ILI9341.h"
// For the Adafruit shield, these are the default: modified !!!
#define TFT_DC D1
#define TFT_CS D8
#define TFT_MOSI D7
#define TFT_MISO D6
#define TFT_CLK D5
#define TFT_RST D2
// If using the breakout, change pins as desired
Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC, TFT_MOSI, TFT_CLK, TFT_RST, TFT_MISO);
void setup() {
Serial.begin(9600);
Serial.println("ILI9341 Test!");
tft.begin();
Serial.println("TFT started");
// read diagnostics (optional but can help debug problems)
uint8_t x = tft.readcommand8(ILI9341_RDMODE);
Serial.print("Display Power Mode: 0x"); Serial.println(x, HEX);
x = tft.readcommand8(ILI9341_RDMADCTL);
Serial.print("MADCTL Mode: 0x"); Serial.println(x, HEX);
x = tft.readcommand8(ILI9341_RDPIXFMT);
Serial.print("Pixel Format: 0x"); Serial.println(x, HEX);
x = tft.readcommand8(ILI9341_RDIMGFMT);
Serial.print("Image Format: 0x"); Serial.println(x, HEX);
x = tft.readcommand8(ILI9341_RDSELFDIAG);
Serial.print("Self Diagnostic: 0x"); Serial.println(x, HEX);
Serial.println(F("Benchmark Time (microseconds)"));
delay(10);
Serial.print(F("Screen fill "));
Serial.println(testFillScreen());
delay(500);
Serial.print(F("Text "));
Serial.println(testText());
delay(3000);
Serial.print(F("Lines "));
Serial.println(testLines(ILI9341_CYAN));
delay(500);
Serial.print(F("Horiz/Vert Lines "));
Serial.println(testFastLines(ILI9341_RED, ILI9341_BLUE));
delay(500);
The display backlight comes on but nothing more !
The serial output is
⸮Hl⸮⸮H⸮$M⸮⸮B,n⸮⸮⸮$:I⸮X⸮⸮h⸮⸮ILI9341 Test!
TFT started
Display Power Mode: 0xFF
MADCTL Mode: 0xFF
Pixel Format: 0xFF
Image Format: 0xFF
Self Diagnostic: 0xFF
Benchmark Time (microseconds)
Screen fill 31392202
Text 1195492
Lines
--------------- CUT HERE FOR EXCEPTION DECODER ---------------
Soft WDT reset
Exception (4):
epc1=0x40101069 epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000000 depc=0x00000000
>>>stack>>>
ctx: cont
sp: 3ffffd90 end: 3fffffd0 offset: 0160
3ffffef0: 00004e20 00000000 0000000d 401002c3
3fffff00: 00004e20 00000000 3ffee628 402032f7
3fffff10: 0000000e 00000000 3ffee628 40203378
3fffff20: 40105d41 00000000 0000000f 000000f0
3fffff30: 00000000 00000000 00000140 40203601
3fffff40: 00000000 3ffee628 049ba5e3 00c339c5
3fffff50: 00009d1f 3ffee818 00000bb8 3ffee840
3fffff60: 000007ff 000000ff 3ffee628 402011f0
3fffff70: 000000f0 00000140 fdf3b645 00b5acfd
3fffff80: 00000019 0000007f 00000080 3ffee840
3fffff90: 000000ff 00009d1f 00000bb8 3ffee840
3fffffa0: 000000ff 000000ff 3ffee7c0 40201bc9
3fffffb0: 3fffdad0 00000000 3ffee814 40204c80
3fffffc0: feefeffe feefeffe 3fffdab0 40100cf5
<<<stack<<<
--------------- CUT HERE FOR EXCEPTION DECODER ---------------
⸮⸮܆⸮⸮⸮`⸮⸮@H⸮⸮hR⸮_⸮ILI9341 Test!
TFT started
Display Power Mode: 0xFF
MADCTL Mode: 0xFF
Pixel Format: 0xFF
Image Format: 0xFF
Self Diagnostic: 0xFF
Benchmark Time (microseconds)
Screen fill