It works with the ESP32 and ESP8266 boards (both have the on-board LED connected to GPIO 2). This code blinks the on-board LED every second. put your main code here, to run repeatedly: put your setup code here, to run once: Uploading Code using PlatformIO IDE: ESP32/ESP8266Ĭopy the following code to your main.cpp file. In PlatformIO, all your Arduino sketches should start with the #include.