ESP32 S3 Module cannot read GPIO's

Hi everyone. Its my first post here, I hope you can help.

I am using an esp32-s3 module with a custom PCB. I wont bore you with the whole story but the current issue is that I cant get any change in the read values from the GPIO pins. I have tried then as INPUT, INPUT_PULLUP and currently trying it as an analogue pin. I connect the GPIO pin to ground (with and without a 10K resistor) and to 3.3v but there is no change to the readout it is giving me.

I've tried lots of different pins and I've tried selecting a few different boards from the IDE but I can't get it to work.

I am using this module and selecting ESP32 s3 dev module - as the board in the IDE

Im using this to flash the module and test it. I have checked the continuity between the pins and they are all fine.

This is the code I am using to test it.

const int buttonPin = 4;
int val = 0;

void setup() {
    Serial.begin(9600);
}

void loop() {
  val = analogRead(buttonPin);
  Serial.println(val); 
  delay(1000);
}

The next thing I was going to try was to buy a different version of the ESP32 modules. Probably the esp32e and see if that works. But I have bought a few of these already so I wanted to see if anyone had any suggestions while I took a break from pulling my hair out.

The module works well otherwise. I tested it with an MQTT sketch and it does everything as it should.

I moved your topic to a more appropriate forum category @adamayyy.

The Nano ESP32 category you chose is only used for discussions directly related to the Arduino Nano ESP32 board.

In the future, please take the time to pick the forum category that best suits the subject of your question. There is an "About the _____ category" topic at the top of each category that explains its purpose.

Thanks in advance for your cooperation.

Sorry about that. And thanks

1 Like

if I run your program of post 1 on a ESP32-S3-DevKitC-1 I get

  1. pin 4 connected to GND I get 0
  2. pin 4 connected to 3.3V I get 4095

serial monitor output

14:24:48.628 -> 0
14:24:49.643 -> 0
14:24:50.620 -> 0
14:24:51.626 -> 0
14:24:56.638 -> 4095
14:24:57.645 -> 4095
14:24:58.651 -> 4095
14:24:59.631 -> 4095
14:25:00.634 -> 4095
14:25:01.644 -> 4095
14:25:02.621 -> 4095
14:25:03.632 -> 4095
1 Like

Hmm. Thanks for checking. Not sure what I'm doing wrong.

Could you please send me what your board flashing settings and version of esp32 board manager you're using? I've copied my settings below and I'm using v2.0.11 of the board manager.

settings for the ESP32-S3-DevKitC-1 (ESP32-S3-WROOM-1)
image

version 2.3.2 of IDE

I found the issue. Turns out the pins of the esp32 S3 and esp32 are different. So the test board I was using had the wrong pins labelled. So on the esp32 S3 GPIO 4 is in the same location as GPIO36 on the esp32. Hope this helps someone in a similar situation in the future.

More off them too.

Different strapping pins as well.

You need to study the pinout diagrams for ESP32xx boards, plenty of variations.

1 Like