Just got the Metro and tried both the graphicstest and the mock_ili9341 example sketches and I get nothing. The screen clears to white and then nothing happens.
Both sketches upload with no issues. I hit the reset button after uploading. Then I unplugged the board and installed the shield. Plug the board back in and it doesn't work.
I'm powering it through the USB port. Does the power switch have to be on or off if powering this way? Does this matter?
Any ideas as to what I'm missing?
Metro Esp32-S2 and 2.8" TFT Cap Shield
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- mikeysklar
- Posts: 14182
- Joined: Mon Aug 01, 2016 8:10 pm
Re: Metro Esp32-S2 and 2.8" TFT Cap Shield
Set the power switch to "on".
Did you open a serial console?
The Metro ESP32-S2 is so fast it might require a delay(500) before initialization here:
Did you open a serial console?
The Metro ESP32-S2 is so fast it might require a delay(500) before initialization here:
Code: Select all
tft.begin();
- phineasphred
- Posts: 15
- Joined: Mon Mar 14, 2016 12:05 pm
Re: Metro Esp32-S2 and 2.8" TFT Cap Shield
I added the delay in the graphicstest sketch. In fact I added a 1 second delay as the first line of setup() and another 1 second delay before tft.begin():
When I power up the Metro and open a serial console I get this:
But nothing draws on the screen and it's just white.
Anything else to try?
Code: Select all
delay(1000);
Serial.begin(9600);
Serial.println("ILI9341 Test!");
delay(1000);
tft.begin();
Code: Select all
ILI9341 Test!
Display Power Mode: 0xDE
MADCTL Mode: 0x0
Pixel Format: 0x7
Image Format: 0xC0
Self Diagnostic: 0xE0
Benchmark Time (microseconds)
Screen fill 200229
Text 25458
Lines 248294
Horiz/Vert Lines 18607
Rectangles (outline) 12682
Rectangles (filled) 416057
Circles (filled) 90811
Circles (outline) 110537
Triangles (outline) 54966
Triangles (filled) 165928
Rounded rects (outline) 54488
Rounded rects (filled) 429130
Done!
Anything else to try?
- mikeysklar
- Posts: 14182
- Joined: Mon Aug 01, 2016 8:10 pm
Re: Metro Esp32-S2 and 2.8" TFT Cap Shield
The code is running and communicating with the screen. This makes me think maybe the ribbon connector is not fully seated properly. Can you pull the black latches and try re-seating it?
- phineasphred
- Posts: 15
- Joined: Mon Mar 14, 2016 12:05 pm
Re: Metro Esp32-S2 and 2.8" TFT Cap Shield
Sorry, I should have said that I do have this working correctly using a Metro M0. I can run all my sketches and they all display perfect. I'm just not able to do the same thing with the Metro Esp32-S2.
- mikeysklar
- Posts: 14182
- Joined: Mon Aug 01, 2016 8:10 pm
Re: Metro Esp32-S2 and 2.8" TFT Cap Shield
Looking at the Metro ESP32-S2 pinout it is clear the SPI pins are on the ICSP header (2x3) 6-pin header.
You most likely need to cut the jumpers on the underside of the shield for pin 11-13 and solder the jumpers for the ICSP pads. The guide formatting makes it sound as though this only for the resistive shield, but the wording indicates it is for any modern CircuitPython boards.
https://learn.adafruit.com/adafruit-2-8 ... ld-3034982
You most likely need to cut the jumpers on the underside of the shield for pin 11-13 and solder the jumpers for the ICSP pads. The guide formatting makes it sound as though this only for the resistive shield, but the wording indicates it is for any modern CircuitPython boards.
https://learn.adafruit.com/adafruit-2-8 ... ld-3034982
- phineasphred
- Posts: 15
- Joined: Mon Mar 14, 2016 12:05 pm
Re: Metro Esp32-S2 and 2.8" TFT Cap Shield
Thanks for the response. If you look at the jumpers on the Cap shield you'd notice that the jumpers are hardwired for ICSP already and NOT 11-13. So, that's not the problem.
- mikeysklar
- Posts: 14182
- Joined: Mon Aug 01, 2016 8:10 pm
Re: Metro Esp32-S2 and 2.8" TFT Cap Shield
Good point. The v2 guide includes a v1 photo so not matched to the project page photo.
Since the serial console is showing the SPI interface as working, but the display itself not showing anything I suspect SPI related settings. The first will probably resolved it, but you might be able to get hardware SPI going with #2, #3.
1) Try the bitbang constructor by manually passing in all the pins. Keep in mind the pin numbers are different on the ICSP header.
2) SPI bus speed - you can try this as a work around
3) SPI Mode which would have to be set with modifying Adafruit_ILI9341.cpp
Since the serial console is showing the SPI interface as working, but the display itself not showing anything I suspect SPI related settings. The first will probably resolved it, but you might be able to get hardware SPI going with #2, #3.
1) Try the bitbang constructor by manually passing in all the pins. Keep in mind the pin numbers are different on the ICSP header.
Code: Select all
// 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);
Code: Select all
tft.begin(3000000);
Code: Select all
initSPI(freq, SPI_MODE3);
- adafruit2
- Posts: 22194
- Joined: Fri Mar 11, 2005 7:36 pm
Re: Metro Esp32-S2 and 2.8" TFT Cap Shield
dont forget the S2 has different numbers for pins on TFT CS/DC/Reset, not the standard arduino pins
- phineasphred
- Posts: 15
- Joined: Mon Mar 14, 2016 12:05 pm
Re: Metro Esp32-S2 and 2.8" TFT Cap Shield
Please let me know if these are correct:
Metro-M0 : TFT_CS = 9, TFT_DC = 10, TFT_MOSI = 23, TFT_CLK = 24, TFT_RST = ?, TFT_MISO = 22
Metro-S2 : TFT_CS = 14, TFT_DC = 15, TFT_MOSI = 35, TFT_CLK = 36, TFT_RST = ?, TFT_MISO = 37
I don't know which pin Reset is on for either board so not sure what to put in there.
I tried using -1 for TFT_RST on the M0 and it locked up.
Metro-M0 : TFT_CS = 9, TFT_DC = 10, TFT_MOSI = 23, TFT_CLK = 24, TFT_RST = ?, TFT_MISO = 22
Metro-S2 : TFT_CS = 14, TFT_DC = 15, TFT_MOSI = 35, TFT_CLK = 36, TFT_RST = ?, TFT_MISO = 37
I don't know which pin Reset is on for either board so not sure what to put in there.
I tried using -1 for TFT_RST on the M0 and it locked up.
- adafruit2
- Posts: 22194
- Joined: Fri Mar 11, 2005 7:36 pm
Re: Metro Esp32-S2 and 2.8" TFT Cap Shield
for TFT clock/mosi just use the built in SPI hardware definition can use -1 for TFT_RST
- phineasphred
- Posts: 15
- Joined: Mon Mar 14, 2016 12:05 pm
Re: Metro Esp32-S2 and 2.8" TFT Cap Shield
So, as I said in my previous post that's what I did. But when I set all the other to what I indicated the M0 locked up.
Can you verify that this should work for the M0:
And this should work for the S2:
Can you verify that this should work for the M0:
Code: Select all
Adafruit_ILI9341 tft = Adafruit_ILI9341(9, 10, 23, 24, -1, 22);
Code: Select all
Adafruit_ILI9341 tft = Adafruit_ILI9341(14, 15, 35, 36, -1, 37);
- mikeysklar
- Posts: 14182
- Joined: Mon Aug 01, 2016 8:10 pm
Re: Metro Esp32-S2 and 2.8" TFT Cap Shield
I placed an order for the Metro ESP32-S2 and 2.8” TFT Cap shield. You will probably resolve this before I receive the parts, but if not I’ll determine the pinouts and post them.
- adafruit2
- Posts: 22194
- Joined: Fri Mar 11, 2005 7:36 pm
Re: Metro Esp32-S2 and 2.8" TFT Cap Shield
you should be using the hardware SPI port, not the GPIO pins
Code: Select all
// For the Adafruit shield, these are the default.
#define TFT_DC 9
#define TFT_CS 10
// Use hardware SPI (on Uno, #13, #12, #11) and the above for CS/DC
Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC);
- phineasphred
- Posts: 15
- Joined: Mon Mar 14, 2016 12:05 pm
Re: Metro Esp32-S2 and 2.8" TFT Cap Shield
adafruit2 I don't think you're up to date on the whole thread. Please read above.
I'm trying to get the display to work with the Metro ESP32-S2. I already have it working with the Metro M0. I was trying to set all the pins on the M0 since I already knew it would work with just setting CS and DC. If I could get it to work setting all the pins on the M0 then it seems it should work with the S2 just by changing the pin numbers.
I'm unable to get the M0 working by setting all the pins, so how would I get the S2 to work using the same idea?
The issue here is NOT getting it to work on the M0 but getting it to work on the Metro ESP32-S2.
Is the M0 considered a UNO? I'm assuming if I use those values for the M0 I should be able to set all the values? I'd still like to know how to get the S2 to work.
Thanks for your response though.
I'm trying to get the display to work with the Metro ESP32-S2. I already have it working with the Metro M0. I was trying to set all the pins on the M0 since I already knew it would work with just setting CS and DC. If I could get it to work setting all the pins on the M0 then it seems it should work with the S2 just by changing the pin numbers.
I'm unable to get the M0 working by setting all the pins, so how would I get the S2 to work using the same idea?
The issue here is NOT getting it to work on the M0 but getting it to work on the Metro ESP32-S2.
Is the M0 considered a UNO? I'm assuming if I use those values for the M0 I should be able to set all the values? I'd still like to know how to get the S2 to work.
Thanks for your response though.
Please be positive and constructive with your questions and comments.