hi, i want extra gpio's in my project. is it possible to make use of Rx Tx of the esp8266 into a normal gpio pins. This will add two extra pins if it can be done.
Rx/Tx Pins of ESP8266 as Normal GPIO
For swapping the serial communication pins into GPIOs, we have to make some changes in our firmware, for that we have to use some special function keyword for changing property of pin, in the library. Here I recommend you to get further support about IoT based projects from SSLA, the company which has IoTs based products & services. I have tried their product EFB-IoT in one of my project.
Abhimanyu Pandit
Permalinkhie amelia,
you can do this by adding some lines of code in the begining of your code i.e. it can be addeed in the setup() function. Add these below lines in the beginning of setup() function.
keep in mind that since you are changing the function of Rx Tx pin, this means that you cannot access serial monitor after this. also if you want to flash the esp8266 then it can be done in the flash mode of gpio which converts the gpio back in to rx and tx and when you boot the esp8266 in normal mode it will take rx tx as gpio.
if you want to revert to normal rx tx function then replace above lines wwith following one.
- Log in or register to post comments
Joined January 21, 2019 42Monday at 12:12 PM