YD-ESP32-S3-N16R8V Confused about PINS and GPIOs. Something doesn't add up

Hello there. I started 10? days ago, with all these things(C/C++, soldering, ESP32,etc)

I already made non-blocking sensor reading, and my program (growcontroller) already has 13 Modules(Classes) with all sort of things, and it's going well.

There was no documentation or link in my bought ESP32. After long search(Images) I found out, it is this one:(I see a "YD-ESP32" label on the back, which seems to confirm it)

I am desperately trying to make a Display work, but NOTHING. I carefully used that chart, to find my GPIOS for MISO, MOSI, CLCK, and so on. (SPI display)

example: Setup.h (TFT_eSPI)
MISO GPIO 11.

Regarding that chart, GPIO11 is actually PIN 10.
= MISO gets get connected to PIN 10.(GPIO11)

This was the way I was using it.

(But I am TOTALLY stuck for 20 hours!!!, to make my TFT work. ILI9488.(3.5inch))

Then I REMEMBERED:
When using the blink example 8 days ago, I actually used the REAL PIN numbers on my board. So going back to my example:

#include <Arduino.h>

#define LED_PIN 11  // GPIO 11?

  pinMode(LED_PIN, OUTPUT); 

  digitalWrite(LED_PIN, HIGH); 
  delay(100);               
  digitalWrite(LED_PIN, LOW); 
  delay(50);              

So regarding my chart, GPIO 11 is actually PIN 10.

But my LED blinks on PIN 11!! not 10

or to make it less confusing:
when using 18-8-3 for 3 leds inside my code, that ARE actually the real pins blinking, NOT the ones from the chart!!

No Wonder nothing works, I need to get this straight, before trying with the display again.(Many setup combos possible)

So where on my BOARD is GPIO 11? lol...that question sounds really stupid, having all the documentation now..lol....but here I am.

Is the pinMode maybe using physical pin labels, and the other stuff like SPI not?
Maybe SPI is different?
Or the digitalWrite?

What's going on?

You are looking at the wrong number, it's the one below the pin. GPIO11 is marked as 11

1 Like

Hello Jim-p
Holy moly!! Now I understand..lol. :flushed:

I read everywhere, that GPIOS are NOT physical pins, so all made sense.
But I guess the special thing of this board is, that IT ACTUALLY DOES!!

I realized looking at GND and 5V, that the labels are underneath the PIN, not on top,
and I feel so extremely stupid now, it's hard to put into words.

I could have been stuck much much longer, ....

This is probably a western culture thing, that I assumed the labels are on top, and aligned with the fact, that I read that on (most) boards, GPIOS != PIN

But I am still speechless about my blunder.... :speak_no_evil:

Not sure but I agree it does seem unusual.
However in any case, with ESPs you should always use the GPIO number in your code.

Typically when the ESP device is mounted on a board the board pins are numbered by GPIO number and not the physical device pin number.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.