Skip to main content

ESP-01 relay and LED

Use Remocon esp01-relay-button, the ESP8266 core, and Bounce2. Assignments are GPIO0 relay, GPIO1 LED, and GPIO2 button. GPIO1 is also UART TX: this example does not use Serial logging. Check boot-level requirements and the relay module's active level.

Configure Wi-Fi and io.remocon.kr:55488. Discover the CID from the workbench on the matching WebSocket server. The Relay and LED controls toggle their respective outputs; the physical button toggles the relay.

@$state contains two characters representing raw GPIO levels. Do not interpret 1 as universally on: the LED is active LOW, and relay modules may also differ. Verify the load's actual state before integrating it into a controller.

Example source​