Use this forum to chat about hardware specific topics for the ESP8266 (peripherals, memory, clocks, JTAG, programming)

User avatar
By sbstek
#61519 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.
Code: Select allvoid 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.
User avatar
By sbstek
#61547
schufti wrote:did you use a pullup on gpio12?


No i didnt. But i tried using this :
Code: Select allpinMode (12,INPUT_PULLUP);

IT didn't work. I also tried to use pins 4,5 as input it didn't work.
Does it mean i have to pull up thr pins if i have to use them in input mode?