Hi, I have a device with a keypad and ESP32 that is locked in a box and is connected to a rpi with UART through GPIOs. I'd like to be able to reprogram my ESP32 using this connexion to avoid opening my keyboard device. RPI and ESP32 conenxion is working well, but in order to reprogram the ESP32 it has to boot in flash mode. This can be done by pressing the boot button or connecting GPIO0 to GND at boot time but I don't have acces to the inside of the box once it is sealed.
So, I'd like to be able to bind GPIO0 to GND if I press one of my keypad key at boot time. The problem is that I want that ONLY at boot time and dont want this behaviour at run time.
So here is my idea :
use the fact that ESP32 sets GPIO3 to 3.3V at boot time, connect one end of my special key to GPIO0 and the other end to some switch (NPN ?) that would connect to GND when GPIO3 is up.
To summerize : I'd like to connect some pin to GND on 3.3V. I imagine that is what one can do with an NPN transistor but I didn't figure out how this works when it comes to let GND flow.
Can you help ?