Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By Jep
#50223
Jep wrote:I tried with
pinMode(GPIO12, INPUT_PULLUP);
but it does not boot anymore :(


I tried to flash same code again with INPUT_PULLUP and it's working now!!!
Aren't there known problems with flashing tool ???
User avatar
By cems
#54370 Even though my board is a nodeMCU 1.0 I am programming my ESP8266 via the Arduino IDE 1.6.10 (I can also use platformIO as an IDE).

I am trying to use the internal pullup on various pins (D8 D4 etc) without any success. I am modifying the standard Blink program to add the following line to setup()

pinMode(D8,INPUT_PULLUP);

alternatively I also tried
pinMode(D8,INPUT);
digitalWrite(D8,true);

Then in the loop() I add:
Serial.println(digitalRead(D8));

What I see is generally a set of zeros. If I connect something to the input then I can make the input either a 1 or a 0 so it's working as an input. But the pullup is not working.

Googling I see discussions of, at one time, INPUT_PULLUP not working and then some fellow named zeroday fixing it so it did work. But all these discussions seemed to be about nodeLua so I don't know if they apply to programming in Ardunio IDE. The Arduino website also says PULLUP should work,

Anyhow I'm posting this in sept 2016. Surely this should be working??? I have two different boards and both behave the same and all the pins i've tried act similarly.