So I am facing a shortage of GPIO pins. I have used 19 of them, but now I require one more. Can I change a pin's function so that it behaves like a GPIO pin? I have 6tx rx pins which I am not using...so can I change their behaviour from tx/rx to GPIO pin?
In general yes. Some pins are dedicated but most can be reconfigured. Check some of the articles on esp32 pinout for details.
In the ESP32 there is a feature in the ESP32 called "GPIO Matrix" that allows certain changes to the function of the GPIOS.
You can find detailed information at:
Chapter 4 Page 48.
But what if I want to change the function of a tx/rx pin? Can I change it to make it work like a GPIO pin?
I´m note sure.
Search at esp32 technical reference.
Which?
There are those, slightly weird, input only pins (34, 35, 36, 39)
For eg I want to change the behaviour of tx0 to being a normal GPIO pin
You can use it that way, but you may have to disconnect it when (re-)programming.
Google "esp32 pinout reference" (Random Nerds Tutorials).
Leo..
On a NANO ESP32?
I'd suggest you change to using an ESP32 devkit which has more I/O