GPIO INPUT DOESNT WORK!
Posted: Wed Jan 25, 2017 3:08 pm
I have a esp-12e module. I have it loaded with the nodemcu firmware. So when i was trying to use a gpio pin to take input. It doesn't work at all.
Here is the code. I flashed it successfully.
SO whenever I ground the pin 12 nothing happens the esp wont take any input.
I tried blinking led with pin 14 as well as 12 it works.
I also tried to connect to the WiFi network and connect to twitter and post something using Twitter library and it works.
But digital input isn't working. I also noted one thing that my esp isn't giving proper serial output at any baudrate.
So does this mean my esp is partially damaged?
Do i need to flash another firmware?
Any help is appreciated.
Here is the code. I flashed it successfully.
Code: Select all
void setup(){
pinMode(12,INPUT);
digitalWrite(12,HIGH);
}
void loop(){
int t= digitalRead(12);
if(t==HIGH){
digitalWrite (14,HIGH);
}
}
SO whenever I ground the pin 12 nothing happens the esp wont take any input.
I tried blinking led with pin 14 as well as 12 it works.
I also tried to connect to the WiFi network and connect to twitter and post something using Twitter library and it works.
But digital input isn't working. I also noted one thing that my esp isn't giving proper serial output at any baudrate.
So does this mean my esp is partially damaged?
Do i need to flash another firmware?
Any help is appreciated.