Esp-01 01s ✦ Recommended
GPIO0, GPIO2 (both with external 10k pull-ups if original ESP-01).
void loop() digitalWrite(LED, LOW); // on delay(1000); digitalWrite(LED, HIGH); delay(1000); esp-01 01s
#define LED 2 // GPIO2, active LOW on ESP-01S void setup() pinMode(LED, OUTPUT); digitalWrite(LED, HIGH); // off GPIO0, GPIO2 (both with external 10k pull-ups if
void setup() dht.begin(); WiFi.begin("SSID", "PASS"); client.setServer("192.168.1.100", 1883); // on delay(1000)
DHT dht(DHTPIN, DHTTYPE); WiFiClient espClient; PubSubClient client(espClient);
| Mode | GPIO0 | GPIO2 | GPIO15 | |------|-------|-------|--------| | UART Download (Flash) | LOW | HIGH | LOW | | Flash Boot (Run) | HIGH | HIGH | LOW | | SDIO/SPI Boot | ? | ? | HIGH (invalid for ESP-01) |