Arduino Nano pinout

A small, breadboard-friendly Arduino with the same chip as the Uno. It uses 5 V logic, so 3.3 V-only sensors need a level shifter.

Arduino Nano pinoutATmega328PD12 · PB4SPI_MISOD11 · PB3PWMD10 · PB2PWMD9 · PB1PWMD8 · PB0D7 · PD7D6 · PD6PWMD5 · PD5PWMD4 · PD4D3 · PD3INT1D2 · PD2INT0GNDRSTRESETRX0 · PD0UART0_RXTX1 · PD1UART0_TXD13 · PB5SPI_SCK3V3REFADC_REFA0 · PC0ADC0A1 · PC1ADC1A2 · PC2ADC2A3 · PC3ADC3A4 · PC4ADC4A5 · PC5ADC5A6 · ADC6ADC6A7 · ADC7ADC75VRSTRESETGNDVIN
Top view, USB connector on the left. Colors: red power, grey ground, green GPIO, yellow analog, orange USB serial, blue I2C.
BoardPilot showing the Arduino Nano in 3D
Try it live

The real app with a simulated Arduino Nano, running in your browser. No install, nothing to plug in.

At a glance

Chip
ATmega328P
Processor
8-bit AVR ATmega328P at 16 MHz, 2 KB SRAM, 32 KB flash, 1 KB EEPROM
Logic level
5 V. 3.3 V-only sensors need a level shifter.
Flashing tool
avrdude
Arduino board (FQBN)
arduino:avr:nano
Live pin view in BoardPilot
Yes (diagnostic agent available)

Pins to avoid or use with care

Input only: A6 (ADC6), A7 (ADC7)

Cannot drive outputs, and have no internal pull-up.

USB serial: RX0 (PD0), TX1 (PD1)

Used for uploading and the serial monitor. Anything connected here can break uploads.

Good pins for LEDs, buttons and signals

D2, D3, D4, D5, D6, D7, D8, D9

Default pins in Arduino

I2C
SDA = A4, SCL = A5. Only these pins work with the Wire library defaults. I2C only works on A4 (SDA) and A5 (SCL).
SPI
MOSI = D11, MISO = D12, SCK = D13, CS = D10.
Analog inputs
A0, A1, A2, A3, A6, A7, A4, A5 (0–5 V)

How to flash it

Clones with the old bootloader upload at 57600 baud: choose “ATmega328P (Old Bootloader)” if uploads fail.

All 30 pins

PinGPIOChip pinFunctionsNotes
D1212PB4GPIO, SPI_MISO (default)
D1111PB3GPIO, PWM, SPI_MOSI (default)
D1010PB2GPIO, PWM, SPI_CS (default)SPI chip select. Keep it an OUTPUT when using SPI, or SPI can stop working.
D99PB1GPIO, PWM
D88PB0GPIO
D77PD7GPIO
D66PD6GPIO, PWM
D55PD5GPIO, PWM
D44PD4GPIO
D33PD3GPIO, INT1, PWM
D22PD2GPIO, INT0
GND—
RST—RESETReset input. Pull it LOW (or press the button) to restart the board.
RX00PD0GPIO, UART0_RXSerial RX. Shared with the USB link: using it for parts can break uploads and the serial monitor.
TX11PD1GPIO, UART0_TXSerial TX. Shared with the USB link: using it for parts can break uploads and the serial monitor.
D1313PB5GPIO, SPI_SCK (default)The built-in LED "L" is on this pin (also SPI clock).
3V3—3.3 V from the USB chip (FT232RL, 50 mA max; often less on clones). Weak: fine for one small sensor only.
REF—ADC_REFAnalog reference input. Leave it unconnected unless your code calls analogReference(EXTERNAL); never power parts from it.
A014PC0GPIO, ADC0
A115PC1GPIO, ADC1
A216PC2GPIO, ADC2
A317PC3GPIO, ADC3
A418PC4GPIO, ADC4, I2C_SDA (default)Default I2C SDA (same signal as the SDA pin).
A519PC5GPIO, ADC5, I2C_SCL (default)Default I2C SCL (same signal as the SCL pin).
A620ADC6ADC6Analog input only: no digitalWrite, no digitalRead and no internal pull-up.
A721ADC7ADC7Analog input only: no digitalWrite, no digitalRead and no internal pull-up.
5V—5 V output from USB or the on-board regulator.
RST—RESETReset input. Pull it LOW (or press the button) to restart the board.
GND—
VIN—Power input (7-12 V recommended) from the barrel jack or an external supply. It is not fed from USB, so do not use it to power parts.

Questions

Which pins are I2C on the Arduino Nano?

SDA is A4 and SCL is A5 (the defaults of the Arduino Wire library). Only certain pins support I2C in hardware, so use these unless you know your core allows others.

Which Arduino Nano pins should I avoid?

RX0, TX1 (USB serial link); A6, A7 (input only).

Is the Arduino Nano 5 V tolerant?

The Arduino Nano runs at 5 V, so 5 V sensors connect directly. 3.3 V-only parts need a level shifter.

Which pins can read analog voltage on the Arduino Nano?

A0, A1, A2, A3, A6, A7, A4, A5, from 0 to 5 V.

How do I upload code to the Arduino Nano?

In the Arduino IDE pick the board arduino:avr:nano (core arduino:avr). Clones with the old bootloader upload at 57600 baud: choose “ATmega328P (Old Bootloader)” if uploads fail.

Wiring guides for the Arduino Nano

Step-by-step wiring, voltage checks and test code for the most used parts:

Compare

Learn the basics

Check your wiring with BoardPilot

BoardPilot shows this board in 3D, flags risky pins as you wire, and flashes it safely with a backup first.

Download BoardPilot

Sources

← All boards