Help me please, I can't fix this error

I will connect the esp32 to the LCD I2C
My problem is that I can connect other devices normally and upload code to the board normally, but if I connect the LCD to the board, I can't upload code and it gives me this error.

Sketch uses 290685 bytes (22%) of program storage space. Maximum is 1310720 bytes.
Global variables use 20568 bytes (6%) of dynamic memory, leaving 307112 bytes for local variables. Maximum is 327680 bytes.
esptool.py v4.6
Serial port COM3
Connecting.........Traceback (most recent call last):
  File "esptool.py", line 37, in <module>
  File "esptool\__init__.py", line 1064, in _main
  File "esptool\__init__.py", line 859, in main
  File "esptool\cmds.py", line 466, in write_flash
  File "esptool\util.py", line 37, in flash_size_bytes
TypeError: argument of type 'NoneType' is not iterable

Chip is ESP32-D0WD-V3 (revision v3.1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: 24:dc:c3:46:42:1c
Uploading stub...
Running stub...
Stub running...
WARNING: Failed to communicate with the flash chip, read/write operations will fail. Try checking the chip connections or removing any other hardware connected to IOs.
Configuring flash size...
[9908] Failed to execute script 'esptool' due to unhandled exception!
Failed uploading: uploading error: exit status 1

What I tried is changing the IDE version or uninstalling and reinstalling the library or trying a different USB cable and I tried moving to another computer and still have the same problem. Please help me.

Welcome to the forum

You started a topic in the Uncategorised category of the forum when its description explicitly tells you not to

Your topic has been moved to a relevant category. Please be careful in future when deciding where to start new topics

1 Like

Check the data sheet for your particular ESP32, several pins are restricted. It appears your LCD connection is interfering with one of those.

Thanks

I checked and it is still correct. SDA and SCL pins are correct but still can't fix it.

What pins are you using for SCL and SDA?

Better yet post an annotated schematic showing exactly how you have wired this. Be sure to show all connections, grounds, and links to each of the hardware devices. There are several variations of these, esp32 to the LCD I2C.

I use pin 22 and 21.

I use A4 and A5

On an ESP32 ?

Sure, I put little labels on the board and wrote A4 and A5. NO?

Feel free to put your own label on any ESP32 pin but that does not change their function

Sorry, that was my (poor) attempt to see if the OP knew that.

I did it thanks everyone. It was my fault. I was confused. I used the GND pin next to Vin 5V. It didn't upload. But I tried changing to another GND. I used it fine. Everything is normal. Does this mean that the GND I connected first has a problem? Thanks.

It would be unusual for all GND pins not to be connected together

Okay, thanks you

If you are using one of the ESP32 boards with the "NodeMCU" form factor, that is not a ground pin. It is the "CMD" pin of the flash chip:

📷

ESP32 NodeMCU-32S ESP-32S Kit by www.mischianti.org - CC BY-NC-ND

It might be that you mistook the "CMD" label as a "GND", since the two are similar in appearance. Alternatively, on some of the cheap Chinese ESP32 dev boards, this pin is incorrectly labeled "GND".