Choose the board in the board panel. The sketch is compiled for that board, and its pins, built-in LED and buttons behave like the real one.
The boards
| Board | Family | I/O pins on the headers | I2C (default) | SPI (default) | Built in |
|---|---|---|---|---|---|
| ESP32 DevKit ESP32-WROOM-32 | ESP32 | 23 | SDA 21, SCL 22 | SCK 18, MOSI 23, MISO 19, SS 5 | LED on GPIO 2 |
| ESP32-S3 DevKitC-1 ESP32-S3-WROOM-1 | ESP32 | 34 | SDA 8, SCL 9 | SCK 12, MOSI 11, MISO 13, SS 10 | LED on GPIO 48 (RGB) · BOOT button on GPIO 0 |
| ESP32-C3 SuperMini ESP32-C3FH4 | ESP32 | 13 | SDA 8, SCL 9 | SCK 4, MOSI 6, MISO 5, SS 7 | LED on GPIO 8 (lit when LOW) · BOOT button on GPIO 9 |
| ESP32-C3 OLED ESP32-C3 · 0.42" OLED | ESP32 | 13 | SDA 5, SCL 6 | SCK 4, MOSI 6, MISO 5, SS 7 | LED on GPIO 8 (lit when LOW) · BOOT button on GPIO 9 · OLED 72×40 at 0x3C |
| ESP32-CAM AI-Thinker ESP32-CAM · OV2640 · 4 MB PSRAM | ESP32 | 8 | SDA 14, SCL 15 | SCK 14, MOSI 15, MISO 2, SS 13 | LED on GPIO 33 (lit when LOW) · OV2640 camera, PSRAM · flash LED on GPIO 4 |
| NodeMCU ESP8266 ESP-12E · 4 MB | ESP8266 | 10 | SDA 4, SCL 5 | SCK 14, MOSI 13, MISO 12, SS 15 | LED on GPIO 2 (lit when LOW) · FLASH button on GPIO 0 |
| Wemos D1 mini ESP-12F · 4 MB | ESP8266 | 10 | SDA 4, SCL 5 | SCK 14, MOSI 13, MISO 12, SS 15 | LED on GPIO 2 (lit when LOW) |
| Arduino UNO R3 ATmega328P · 16 MHz · 5 V | AVR (ATmega328P) | 20 | SDA A4, SCL A5 | SCK D13, MOSI D11, MISO D12, SS D10 | LED on D13 |
| Arduino Nano ATmega328P · 16 MHz · 5 V | AVR (ATmega328P) | 22 | SDA A4, SCL A5 | SCK D13, MOSI D11, MISO D12, SS D10 | LED on D13 |
| Raspberry Pi Pico W RP2040 · CYW43439 Wi-Fi | RP2040 | 26 | SDA GP4, SCL GP5 | SCK GP18, MOSI GP19, MISO GP16, SS GP17 | LED on the Wi-Fi chip · Wi-Fi (CYW43439) |
| STM32 Blue Pill STM32F103C8T6 · 72 MHz | STM32 | 32 | SDA PB7, SCL PB6 | SCK PA5, MOSI PA7, MISO PA6, SS PA4 | LED on PC13 (lit when LOW) |
| STM32 Black Pill STM32F411CEU6 · 100 MHz | STM32 | 32 | SDA PB7, SCL PB6 | SCK PA5, MOSI PA7, MISO PA6, SS PA4 | LED on PC13 (lit when LOW) · KEY button on PA0 |
| Nucleo-F401RE STM32F401RET6 · 84 MHz | STM32 | 22 | SDA D14, SCL D15 | SCK D13, MOSI D11, MISO D12, SS D10 | LED on D13 · USER button on PC13 |
The board of an example is chosen with it. A project remembers its board.
Pin names and numbers
- In a sketch, use GPIO numbers as on the real board:
pinMode(13, OUTPUT). On ESP8266 boards the printed names work too:D1…D8,A0. - The pin map in the board panel shows every header pin with its label; hover a pin to see what it can do (ADC, input only, I2C, boot pin, built-in LED).
- Pins that the board needs for itself (flash, USB serial) are not offered for parts.
Rules of the real chips
The simulator keeps the rules that trip people up on real hardware, and the parts list warns about them:
| Rule | What happens |
|---|---|
| ESP32 GPIO 34–39 are input only | pinMode(34, OUTPUT) is refused (a message in the serial monitor), and these pins are not offered for outputs. |
| ADC2 cannot be read while Wi-Fi is on (ESP32) | analogRead() on an ADC2 pin returns 0 while Wi-Fi is connected, with a warning. Use ADC1 pins (GPIO 32–39 on the DevKit). |
| Boot (strapping) pins | A part on GPIO 0, 2, 12 or 15 (DevKit) gets a note; GPIO 12 held HIGH at reset is an error, because the board would not start. |
| 12-bit ADC (ESP32), 10-bit A0 (ESP8266) | analogRead() gives 0–4095 on ESP32 and 0–1023 on ESP8266's only analog pin A0. |
| I2C and SPI pins | The bus pins of the board (table above) are used by I2C and SPI parts; another part on them gets a warning. |
Built-in LEDs, buttons, display and camera
- LED_BUILTIN lights up on the board picture. On ESP32-C3 and ESP8266 boards the LED is lit when the pin is
LOW, as on the real boards. The ESP32-S3 has an RGB LED:
rgbLedWrite(RGB_BUILTIN, r, g, b)shows its colour. - BOOT / FLASH buttons: hold them with the mouse on the board picture; the pin reads LOW while pressed.
- ESP32-C3 OLED: its 72×40 display (SSD1306 at 0x3C on GPIO 5/6) works with U8g2 or Adafruit SSD1306 and is shown on the board. Another I2C part at 0x3C would clash with it.
- ESP32-CAM: OV2640 camera with PSRAM and a flash LED on GPIO 4. Pictures come from a test pattern or your computer's camera (menu on the board panel; the browser asks for permission the first time).
Arduino, Raspberry Pi Pico W and STM32 boards
These boards use the API of their own Arduino core, as on the real board:
| Board | Pins in a sketch | What differs from an ESP32 |
|---|---|---|
| Arduino UNO R3, Nano (ATmega328P, 5 V) | 2 … 13, A0 … A5 (Nano: A6, A7 analog only); LED on 13 |
10-bit ADC. PWM only on 3, 5, 6, 9, 10, 11: analogWrite on another pin switches it fully on (from 128) or off.
Interrupts only on 2 and 3, and attachInterrupt() takes the interrupt number: use digitalPinToInterrupt(2).
EEPROM (1 KB) works without begin() and commit(). No Wi-Fi. |
| Raspberry Pi Pico W (RP2040, 3.3 V) | 0 … 22, 26 … 28 (GP numbers), A0 … A2 = GP26 … GP28 |
Every pin has PWM and interrupts. ADC reads 10 bits unless analogReadResolution(12). LED_BUILTIN is the LED on the
Wi-Fi chip. Wi-Fi, MQTT and HTTP work as on the ESP32 (WiFi.h, WiFiClientSecure, PubSubClient, HTTPClient.h). |
| STM32 Blue Pill, Black Pill, Nucleo-F401RE (3.3 V) | PA0 … PC15; Nucleo also D0 … D15, A0 … A5 |
ADC reads 10 bits unless analogReadResolution(12). PWM only on timer pins (others switch on or off). The Pill LED on PC13
is lit when LOW; USER_BTN is the button (Black Pill KEY on PA0, Nucleo USER on PC13). EEPROM without
begin(). No Wi-Fi. |
Not like the real chips yet: int is 32 bits everywhere (16 bits on a real AVR), the UNO's 2 KB of RAM is not a
limit, and the chips' registers (ports, timers) do nothing: use pinMode, digitalWrite and
analogWrite. Serial is always the serial monitor; Serial1 … are the pins of each board.
Examples: uno_traffic_light.ino, nano_weather_lcd.ino, pico_w_iot_platform_mqtt.ino,
bluepill_pwm_pot.ino, blackpill_oled_counter.ino, nucleo_ultrasonic_alarm.ino.
ESP8266 boards
NodeMCU and Wemos D1 mini use the ESP8266 Arduino core: ESP8266WiFi.h, ESP8266HTTPClient.h,
Servo.h, EEPROM.h, SoftwareSerial, LittleFS. ESP32 headers such as WiFi.h or
Preferences.h are refused there, with a message naming the replacement. A sketch written for both
(#if defined(ESP8266) … #else … #endif) compiles on both. Not available yet: ESP8266WebServer,
ESP8266mDNS, ESP8266httpUpdate.