Compile for the larger AVR target
Select Arduino Mega 2560 before Verify. Its 16 MHz ATmega2560 target provides 253,952 bytes of application flash and 8,192 bytes of SRAM, with bootloader space already excluded from the application limit. Build Output uses these Mega limits. Servo, Wire, SPI, EEPROM, and the bundled library compile checks are available for this target; compilation is not a hardware test.
Wire to the Mega pin map
Mega exposes D0–D53 and A0–A15. PWM pins are D2–D13 and D44–D46. I2C uses D20 (SDA) and D21 (SCL); SPI uses D50 (MISO), D51 (MOSI), D52 (SCK), and D53 (SS), also available on the ICSP header. Do not copy Uno A4/A5 I2C wiring onto a Mega. Check the board-aware pin helper before connecting peripherals.
Choose the right serial interface
Serial connects to the board’s USB serial bridge through D0/D1. Serial1 uses RX19/TX18, Serial2 uses RX17/TX16, and Serial3 uses RX15/TX14 for external devices. These extra UARTs do not become separate browser USB ports. Serial Monitor still uses the selected USB connection; use your sketch to relay other UART data if needed.
Upload support and simulation limits
The Mega upload target uses the STK500v2/Wiring bootloader protocol at 115200 baud, with board-specific signature and flash verification. This release has compiler and protocol tests; physical Mega upload has not been verified in the development test environment. Mega 2560 simulation is not supported. Circuitera blocks running this target in the simulator rather than silently simulating an Uno.