ESP-01 ≡ TX button and an RX LED
void setup() {
  pinMode(1, INPUT_PULLUP);  
  pinMode(3, OUTPUT);        
}

void loop() {
  
  int buttonState1 = digitalRead(1);  

  if (buttonState1 == LOW) digitalWrite(3, HIGH);            
  else { digitalWrite(3, LOW); }

  delay(50);  

}

 

TX button RX LED circuit circuit


ESP01
ESP01S


05 Dec. 2024 | Last Updated: 22 Nov. 2025 | jaimedcsilva

Related
  • How to Set Up Arduino IDE for ESP8266 Development
  • Blink the Built-in LED
  • Connecting the ESP8266 to Wi-Fi
  • Measuring Wi-Fi Signal Strength (RSSI) with ESP8266
  • ESP-01 ≡ How to program an ESP-01?
  • ESP-01 ≡ Detecting I2C Devices
  • ESP-01 ≡ TX button and an RX LED
  • ESP-01 ≡ Blink external LED on GPIO0
  • NodeMCU ≡ Blink external LED on D0
  • NodeMCU ≡ Detecting I2C Devices

  • Buy Me a Coffee