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

User avatar
By markus_e
#73591 I use a ESP8266-01 behind a wall switch to read several switches and convert them to mqtt messages.
problem is that I want to use GPIO1 (normally TX output) as input. I initialize it as input with pullup active.
pinMode(1,INPUT_PULLUP);
The wall switch is connected to bridge the GPIO1 to GND when pressed.
The crazy thing is, that for two weeks all worked fine. Suddenly that changed: the input is now floating and changes between 0 and 1 all the time when switch open. when I press the switch, thus connecting GPIO1 to GND, the esp8266 correctly reports 0 constantly.
Question: Is it a known behaviour that internal pullup is not reliable? I will have to try to mount external pullup.
Is it a problem to use GPIO1 as input? I checked the ESP8266-01 board and there is not pulldown or pullup resistor mounted.
I also tried several things in software: removed all serial commands, and tried
Serial.setDebugOutput(0);
also tried
Serial.swap() ; to remap serial function to other GPIOs
also tried
pinMode(1, FUNCTION_3); // swap from serial TX to GPIO mode

but nothing helped.
Is the GPIO pullup blown for any reason?
thanks for help.