Guides · 3 min read

Which Arduino Should I Buy? Uno vs Nano vs Mega vs Leonardo

What's the difference between Arduino Uno and Mega? A pin, memory and use-case comparison of the Uno, Nano, Mega 2560 and Leonardo, plus when an ESP32 or Pico is the better choice.

When you start with Arduino, the first question is usually: which board should I buy? The Uno, Nano, Mega and Leonardo are all programmed with the same Arduino IDE and most code runs on all of them. The differences are in pin count, memory, size and a few special abilities. In this guide we put the boards side by side and explain which one to choose when.

Arduino Uno
Arduino Uno
Arduino Nano
Arduino Nano
Arduino Mega
Arduino Mega

The short answer

  • If it's your first board: Arduino Uno.
  • If you're building a small, permanent project on a breadboard: Arduino Nano.
  • If you need lots of pins, several serial devices or a big program: Arduino Mega 2560.
  • If you're building a device that connects to a computer as a keyboard/mouse: Arduino Leonardo.
  • If you need Wi-Fi or Bluetooth: an ESP32 instead of an Arduino.

Comparison table

FeatureUno R3NanoMega 2560Leonardo
MicrocontrollerATmega328PATmega328PATmega2560ATmega32U4
Program memory32 KB32 KB256 KB32 KB
RAM2 KB2 KB8 KB2.5 KB
Digital pins (PWM)14 (6)14 (6)54 (15)20 (7)
Analog inputs681612
Hardware serial ports1141 + USB
Size68 × 53 mm45 × 18 mm101 × 53 mm68 × 53 mm
Shield compatibilityFullNoneMostMost

Arduino Uno: the beginner's standard

The Uno is the most widely used Arduino board. Almost all examples, tutorials and shields on the internet are written for it. Because it runs on 5 V, most sensors and modules connect directly, and it's quite tolerant of small wiring mistakes. Its only drawback is that the pins and 2 KB of RAM run out on bigger projects.

Arduino Nano: the Uno's little sibling

The Nano uses the same chip as the Uno, so code written for the Uno runs unchanged. It's thumb-sized and plugs straight into a breadboard. It also has the extra A6 and A7 analog inputs (these two pins can only do analog reads). Shields don't fit, which makes it ideal for permanent projects that need to fit in a box after prototyping.

Arduino Mega 2560: the pin and memory monster

There are three main reasons to choose the Mega: 54 digital and 16 analog pins, 4 hardware serial ports and 8 times the Uno's program memory. You can connect several serial devices like GPS, Bluetooth and RFID at the same time and work with big libraries and long code. The Mega is also at the heart of 3D printer boards (RAMPS).

If you get a 'not enough memory' warning when compiling on the Uno or you run out of pins, switching to the Mega solves it with almost no code changes. Note: on the Mega the I2C pins are 20 (SDA) and 21 (SCL), not A4/A5.

Arduino Leonardo: the board that can be a keyboard and mouse

The Leonardo's ATmega32U4 chip has USB built right in. This lets the board appear to a computer as a keyboard, mouse or gamepad (Keyboard.h and Mouse.h libraries). It's ideal for macro keypads, presentation remotes and game controllers. Most shields fit, but the I2C pins are in a different place.

Arduino Leonardo

When are the ESP32 and Raspberry Pi Pico better?

ESP32
ESP32
Raspberry Pi Pico
Raspberry Pi Pico
What you needRecommended boardWhy?
Phone control, sending data to the internetESP32Built-in Wi-Fi and Bluetooth, 240 MHz dual core
A sensor that runs for months on a batteryESP32Very low consumption in deep sleep
Learning with PythonRaspberry Pi PicoMicroPython, very cheap
Cameras, image processingRaspberry Pi 4/5A computer running Linux
The easiest start with 5 V sensorsArduino Uno5 V logic, the most examples
The ESP32 and Pico run on 3.3 V. Don't connect sensors with 5 V outputs (e.g. the HC-SR04's ECHO pin) directly to these boards; use a voltage divider or a level shifter.

Original or clone?

Clone boards use the same chip as the originals and work the same way, at a much lower price. The difference is usually the USB converter chip (CH340), so you may need to install a driver on your computer. Buying an original board is a way to support the open-source Arduino project.

Our recommendation for getting started

If you're new to electronics, start with an Arduino Uno; once you've mastered the basic projects, add an ESP32 for internet-connected projects. You can compare every pin on both boards, including which ones are analog, PWM, I2C or SPI, in the interactive pinout tool.

Frequently asked questions

What's the biggest difference between the Arduino Uno and the Mega?

The Mega has many more pins (54 digital, 16 analog), 4 serial ports and 8 times more program memory. The Uno is smaller and more common, and it's enough for almost all beginner projects.

Does code written for the Uno run on the Mega?

Most of the time, yes. The main thing to watch is that the I2C and SPI pins are in different places (on the Mega, I2C is 20/21 and SPI is 50–53).

Is there any code difference between the Nano and the Uno?

No, both use the ATmega328P, so the same code runs. Just select Nano as the board in the Arduino IDE. Older Nano clones may need the 'ATmega328P (Old Bootloader)' option.

Should I buy an Arduino or an ESP32?

If you don't need Wi-Fi or Bluetooth and want to work comfortably with 5 V sensors, go for the Arduino Uno. If you're building internet-connected projects controlled from your phone, the ESP32 is a better fit and usually cheaper.

Which board should an Arduino starter kit have?

The Arduino Uno is the right choice for starter kits; most lessons and examples are built around it. A breadboard, LEDs, resistors, buttons, a potentiometer and a few sensors in the kit are enough.

See all projects
LED Blink
AR-1Beginner

LED Blink

The very first hello of electronics: switching a single LED on and off. The Arduino keeps the LED on for one second and off for one second, so you can easily follow every blink.

4.6(203)
1384
Arduino Developer Keyboard
AR-65Intermediate
Premium

Arduino Developer Keyboard

If you are tired of typing the same lines over and over while coding, this little keypad becomes your shortcut keyboard.

4.7(40)
52
One-Way Communication Between 2 Arduinos
AR-57Intermediate
Premium

One-Way Communication Between 2 Arduinos

You get two Arduinos talking over a single wire: press the button on one and the LED on the other lights up, press it again and it goes off.

4.5(38)
51
LED Blink with ESP32
ES-1Beginner

LED Blink with ESP32

Teaches basic GPIO output usage with ESP32. We achieve a blinking effect by turning an LED on and off from a digital pin. ESP32 version of the classic blink project on Arduino UNO; the basic blink commands in the Arduino environment are the same, but the ESP32's pin layout and 3.3 V GPIO levels differ from those of the Arduino UNO.

4.7(38)
114
ESP32 Asynchronous Web Server (with IP Display on LCD)
ES-27Advanced

ESP32 Asynchronous Web Server (with IP Display on LCD)

In this project, we’re turning the ESP32 into an asynchronous web server that you can control from your phone or computer on the same Wi-Fi network. Thanks to the ESPAsyncWebServer library, the server can process multiple requests simultaneously (unlike the classic WebServer.h, which blocks on a single request). You’ll be able to open the ESP32’s IP address in a browser and click the ON/OFF buttons (the /on and /off routes) to turn the LED connected to GPIO 5 on and off.

4.8(16)
27
Raspberry Pi Pico Onboard LED Blink (Pico and Pico W)
PI-1Beginner

Raspberry Pi Pico Onboard LED Blink (Pico and Pico W)

The opening project of the Raspberry Pi Pico series! We blink the Pico's green built-in LED to confirm the board works, the classic "Hello World" first experiment. No external parts needed, just the Pico and a USB cable. The code is written in MicroPython, the language officially supported by the Raspberry Pi Foundation.

5.0(1)
11
Raspberry Pi Pico Traffic Light Simulator (3 LEDs Sequential)
PI-4Beginner

Raspberry Pi Pico Traffic Light Simulator (3 LEDs Sequential)

We recreate real traffic light logic with red, yellow and green LEDs, the first Pico project to move up to 3 LEDs! Green says "go" for 4 seconds, yellow "get ready" for 1.5 seconds, red "stop" for 3 seconds, and red+yellow "set off" for 1 second (the European traffic light pattern). You'll learn to define functions (def all_off()), state machine logic and multi-GPIO synchronization.

4.0(1)
12
Bluetooth Controlled Car with L298N
AR-80Advanced
Premium

Bluetooth Controlled Car with L298N

Turn your phone into a remote and drive your own robot car. The Arduino receives commands from a remote-control app on your phone through a Bluetooth module and spins the wheels with a motor driver…

5.0(39)
66