Arduino UNO Pinout: Complete Guide with Diagram
The Arduino UNO has 14 digital pins, 6 analog pins and a power header, and many of them serve more than one purpose. A pin that works as a plain input in one sketch can also act as a PWM output, a serial line or an interrupt source in another sketch. Knowing which function belongs to which pin helps you avoid wiring mistakes before they cost you an evening of debugging.
This guide covers every pin on the Arduino UNO in the order you will meet them on the board. For each group of pins, we explain what the pins do, how to use them in a sketch, and which electrical limits you need to respect. A diagram at the start and a full reference table at the end are included, so you can use the page both for learning and for quick lookups later.
If you also own a smaller board, the Arduino Nano pinout guide shows how closely it matches the UNO. When you are ready to write code for these pins, the Arduino Core Tutorials cover GPIO, ADC, UART, I2C, SPI, PWM and interrupts with working examples.
Table of contents
- Arduino UNO Pinout: Complete Guide with Diagram
- Arduino UNO Specifications
- Arduino UNO Pinout Diagram
- Arduino UNO Power Pins
- Arduino UNO Digital Pins
- Arduino UNO PWM Pins
- Arduino UNO Interrupt Pins
- Arduino UNO Analog Pins
- Arduino UNO UART Pins
- Arduino UNO I2C Pins
- Arduino UNO SPI Pins
- Arduino UNO Timer and Input Capture Pins
- Arduino UNO Pinout Table
- Conclusion
Arduino UNO Specifications
The Arduino UNO is a microcontroller board built around the ATmega328P chip, which runs at 16 MHz. It provides digital input and output, analog input, PWM output and three serial interfaces, which is enough for most small embedded projects. The board is inexpensive and widely supported, so it remains a common first board for people learning embedded programming.
| Specification | Detail |
|---|---|
| Microcontroller | ATmega328P |
| Clock speed | 16 MHz |
| Flash memory | 32 KB (0.5 KB used by the bootloader) |
| SRAM | 2 KB |
| EEPROM | 1 KB |
| Operating voltage | 5 V |
| Input voltage (VIN and DC jack) | 7 V to 12 V recommended, 6 V to 20 V limits |
| Digital I/O pins | 14 (6 support PWM) |
| Analog input pins | 6 |
| Maximum current per I/O pin | 40 mA absolute maximum, 20 mA recommended |
| USB connector | Type-B |
Arduino UNO Pinout Diagram
The diagram below shows the complete pinout of the Arduino UNO. It is useful to keep it open in a second tab while you read the sections that follow, because each section refers to pins by the same labels.
The pins fall into four main groups, and the rest of this guide follows the same order.
- The power pins supply the board and any external components that you connect to it.
- The digital I/O pins read and write HIGH and LOW signals.
- The analog pins measure voltages between 0 V and 5 V.
- The communication pins carry UART, I2C and SPI traffic to other devices.
Arduino UNO Power Pins
The power header sits on the lower left side of the board. These pins let you feed power into the Arduino and also let you draw power for sensors and modules.
VIN Pin
VIN stands for voltage input, and it accepts an external supply that feeds the onboard regulator. The board tolerates 6 V to 20 V, and the recommended range is 7 V to 12 V. A supply near 7 V to 9 V keeps the regulator cooler, because the regulator turns every extra volt into heat. A battery pack or a wall adapter is the usual source for this pin.
5V Pin
The 5V pin carries the regulated 5 V rail of the board. You can use it to power sensors and modules that need 5 V. The total current is limited by the source of the board, which is about 500 mA from USB and less from a high-voltage supply on VIN because of regulator heat.
3.3V Pin
The 3.3V pin provides a regulated 3.3 V output for parts that cannot tolerate 5 V, such as some Wi-Fi chips, Bluetooth modules and sensors. This pin can supply only about 50 mA, so it is suitable for small modules and not for anything that draws more current.
GND Pins
The UNO has three GND pins, and all of them are connected together inside the board, so you can use any one of them. An external module must share its ground with the Arduino, because the signals between the two devices are measured against that common reference. Without a shared ground, the readings become unreliable.
RESET Pin
Pulling the RESET pin LOW restarts the microcontroller in the same way as the reset button on the board. Other circuits use this pin when they need to restart the Arduino from outside, and shields often route their own reset button to it.
IOREF Pin
The IOREF pin reports the voltage at which the I/O pins operate, which is 5 V on the UNO. Shields read this pin to find out whether the board uses 5 V or 3.3 V logic, so that they can adjust their own circuits. Most personal projects never need to connect to it.
Power Pin Rules
- Avoid connecting several power sources at once, since USB and an external supply on VIN can conflict with each other.
- Keep the VIN voltage between 7 V and 9 V when you want the regulator to stay cool.
- Connect the ground of every external circuit to a GND pin of the Arduino.
- Do not draw more than 50 mA from the 3.3V pin.
Arduino UNO Digital Pins
The Arduino UNO has 14 digital pins, labeled D0 to D13. They handle most everyday tasks, such as driving LEDs, reading buttons and switching relay modules. Many single-wire parts also need only one digital pin, including the DHT11 and DHT22 sensors, the DS18B20 temperature sensor, the PIR motion sensor, the IR sensor and the WS2812 LED ring. The functions digitalWrite() and digitalRead() control them, and the digitalRead() and digitalWrite() tutorial explains both in detail.
How Digital Pins Work
Each digital pin works as an input or an output, depending on the mode that you set with pinMode().
pinMode(7, OUTPUT);
digitalWrite(7, HIGH);In output mode, a HIGH pin drives 5 V and a LOW pin drives 0 V. In input mode, the ATmega328P reads a voltage above about 3 V as HIGH and a voltage below about 1.5 V as LOW. A voltage between those two levels gives an unreliable result, so an input should never be left floating. A pull-up or pull-down resistor, or the internal pull-up enabled with INPUT_PULLUP, keeps the pin at a defined level.
The absolute maximum current of a pin is 40 mA, but this value is a limit and not a design target. A current of 20 mA or less is a safe working value, and the total current through all I/O pins together should stay below 200 mA.
Pin 13 and the Built-in LED
Pin 13 connects to the LED labeled L on the board, which is why most blink examples use it. The LED and its series resistor load the pin, so pin 13 behaves less cleanly as an input than the other pins. For that reason, it is better to use a different pin when you need a digital input.

Digital Pin Rules
- Call
pinMode()for a pin before you use it. - Add a resistor of 220 Ω to 330 Ω in series with every LED.
- Use a transistor, MOSFET or relay module for motors and other heavy loads, because a pin cannot supply that much current.
- Avoid pin 13 as an input, because of the onboard LED circuit.
Arduino UNO PWM Pins
Six of the digital pins can produce PWM (pulse width modulation) signals, and the board marks them with a tilde (~) symbol. These pins are 3, 5, 6, 9, 10 and 11. PWM switches a pin between HIGH and LOW very quickly, and the share of time spent HIGH (the duty cycle) sets the average output level. This is the standard way to dim an LED or control the speed of a small motor through a driver. The passive buzzer tutorial shows another use of timer-generated signals on these pins. The Arduino PWM and analogWrite() tutorial shows complete examples.
The analogWrite() function accepts a value from 0 to 255, where 0 keeps the pin LOW at all times and 255 keeps it HIGH at all times. The resolution is 8 bits, which gives 256 steps.
| PWM pin | Timer | Default frequency |
|---|---|---|
| 3 | Timer2 | about 490 Hz |
| 5 | Timer0 | about 980 Hz |
| 6 | Timer0 | about 980 Hz |
| 9 | Timer1 | about 490 Hz |
| 10 | Timer1 | about 490 Hz |
| 11 | Timer2 | about 490 Hz |
The PWM pins also work as ordinary digital pins, because PWM becomes active only when you call analogWrite() on them. Pins that share a timer also share its settings, so a change to one timer affects both of its pins. Timer0 additionally drives millis() and delay(), which means that changes to Timer0 affect the timing functions.
Arduino UNO Interrupt Pins
An interrupt lets the microcontroller pause its normal program and run a short function as soon as a pin changes state. This approach is more efficient than checking a pin repeatedly inside loop(), and it is often the only dependable way to catch short pulses.
External Interrupts on Pins 2 and 3
The UNO has two dedicated external interrupt pins. INT0 is on digital pin 2, and INT1 is on digital pin 3. You attach a handler with attachInterrupt(), and each pin has its own interrupt vector. The Arduino external interrupts tutorial walks through the setup. If you plan to combine interrupts with a task scheduler, the guide on using interrupts with FreeRTOS on Arduino covers that case.
The interrupt can be set to one of four trigger modes.
- RISING triggers when the pin goes from LOW to HIGH.
- FALLING triggers when the pin goes from HIGH to LOW.
- CHANGE triggers on any change of state.
- LOW triggers continuously while the pin stays LOW.
Pin Change Interrupts
Every I/O pin of the UNO can generate a pin change interrupt (PCINT), which makes this feature useful when two interrupt pins are not enough. The pins are grouped by port, and each port shares a single interrupt vector. When the interrupt fires, your code has to read the pins and work out which one changed.
| Feature | External interrupts (INT0, INT1) | Pin change interrupts (PCINT) |
|---|---|---|
| Available pins | D2 and D3 only | All digital and analog pins |
| Separate handler per pin | Yes | No, one handler per port |
| Trigger modes | RISING, FALLING, CHANGE, LOW | CHANGE only |
| Ease of use | Simple | Requires manual pin checks |
Pins 2 and 3 are the better choice whenever they are free, and pin change interrupts are the fallback when you need more sources.
Arduino UNO Analog Pins
The UNO has six analog input pins, labeled A0 to A5, on the lower header of the board. They connect to the 10-bit ADC (analog-to-digital converter) of the ATmega328P, and analogRead() returns a value from 0 to 1023.
How Analog Input Works
The ADC compares the input voltage with a reference voltage and returns a proportional number.
ADC value = (input voltage / reference voltage) × 1023The default reference is 5 V, so an input of 2.5 V gives a reading of about 511. Each step represents about 4.9 mV, which suits most sensors. The GP2Y0A41SK0F distance sensor tutorial is a good example of a sensor that reports its reading as an analog voltage. The Arduino ADC and analogRead() tutorial covers sampling, averaging and conversion to real units.
AREF Pin
The AREF pin lets you supply your own reference voltage to the ADC. If you apply 2.5 V to AREF and select the external reference in your code, the ADC range becomes 0 V to 2.5 V, and the same 1024 steps cover a smaller range. That gives finer resolution for small signals. The input voltage must stay below the reference voltage, otherwise the reading clips at 1023.
Call analogReference(EXTERNAL) before you apply a voltage to AREF, because the board also has an internal reference connected to that pin, and connecting an external source without this call can damage the chip.
Using Analog Pins as Digital Pins
Pins A0 to A5 also work as ordinary digital pins when you run out of regular ones. The same functions apply, and the pin names are valid in pinMode(), digitalWrite() and digitalRead().
pinMode(A0, OUTPUT);
digitalWrite(A0, HIGH);Analog Pin Rules
analogRead()maps 0 V to 5 V onto the values 0 to 1023 by default.- An analog pin must never receive more than 5 V.
- A lower AREF voltage improves resolution but reduces the usable input range.
- A floating analog input produces random readings, so connect it to a signal source or to a defined level.
Arduino UNO UART Pins
The UNO has one hardware UART (universal asynchronous receiver-transmitter), and it uses digital pin 0 as RX (receive) and digital pin 1 as TX (transmit). The same lines connect to the USB-to-serial chip of the board, so the Serial Monitor on your computer shares them with anything that you wire to these pins.
UART is the standard interface for debug messages and for serial modules such as the HC-05 and HC-06 Bluetooth modules, the SIM800L and SIM900 GSM modules and the NEO-6M GPS module. Disconnect any wires from pins 0 and 1 before you upload a sketch, because the upload process uses the same lines and a connected module can make the upload fail. The Arduino UART tutorial explains how to send and receive data.
SoftwareSerial for a Second Serial Port
The SoftwareSerial library creates an additional serial port on any two digital pins. It is a practical solution when a GPS or Bluetooth module needs a port while the hardware UART is busy with debug output. The library handles the timing in software, so it works reliably at 9600 baud and becomes less dependable at higher speeds.
Arduino UNO I2C Pins
I2C (Inter-Integrated Circuit) connects several devices to the same two wires. On the UNO, SDA (data) is on analog pin A4, and SCL (clock) is on analog pin A5. Each device on the bus has its own 7-bit address, so the Arduino can talk to one device at a time.
Common I2C devices include SSD1306 OLED displays, DS3231 real-time clock modules, MPU-6050 motion sensors, I2C LCD1602 displays and external EEPROM chips. Temperature and humidity sensors such as the BME280 and the AHT20 also use this bus. The Wire library handles the protocol, and the Arduino I2C tutorial shows how to scan the bus and read from a device. Once the I2C bus is in use, A4 and A5 are no longer available as analog inputs, so it helps to plan this when you assign pins at the start of a project.
Arduino UNO SPI Pins
SPI (Serial Peripheral Interface) is the fastest of the three serial interfaces on the board, and it uses four lines.
- MOSI (master out, slave in) is on pin 11.
- MISO (master in, slave out) is on pin 12.
- SCK (serial clock) is on pin 13.
- SS (slave select) is on pin 10.
SPI suits devices that move a lot of data, such as ST7735 TFT displays, SD card modules, W25Q flash memory chips, ILI9341 touchscreens and nRF24L01 radio modules. The master uses a separate chip-select line for each device, so a project with several SPI devices needs one extra digital pin per device. Pins 10 to 13 are occupied while SPI is active, and pin 13 also drives the onboard LED, which may flicker during transfers.
Arduino UNO Timer and Input Capture Pins
Two more groups of pins connect directly to the timers inside the ATmega328P.
Timer Clock Input Pins T0 and T1
Pin 4 is the T0 input, and pin 5 is the T1 input. Each one can feed an external clock signal to a hardware timer. By default, the timers count the internal 16 MHz clock, but with an external source they count the pulses on the pin instead. This feature is used for frequency counters, pulse counting from an encoder and similar measurements.
For timing in your own sketches, the delayMicroseconds() tutorial shows how to create short and accurate delays.
Input Capture Pin ICP1
Pin 8 is the input capture pin (ICP1) of Timer1. When a rising or falling edge appears on the pin, the hardware copies the current Timer1 value into a register without any help from the CPU. This gives a precise time stamp for events, and it is useful for measuring pulse width, motor speed from an encoder and the echo time of an ultrasonic sensor such as the HC-SR04. Most ultrasonic libraries use pulseIn(), which blocks the program while it waits, whereas the input capture unit leaves the CPU free for other work.
Arduino UNO Pinout Table
The tables below list every pin of the UNO with its port on the ATmega328P, its PWM capability and its alternate functions.
Digital Pins
| Arduino pin | ATmega328P port | PWM | Alternate function | Description |
|---|---|---|---|---|
| D0 | PD0 | No | RX | UART receive |
| D1 | PD1 | No | TX | UART transmit |
| D2 | PD2 | No | INT0 | External interrupt 0 |
| D3 | PD3 | Yes | INT1 | External interrupt 1 |
| D4 | PD4 | No | T0 | Timer0 external clock |
| D5 | PD5 | Yes | T1 | Timer1 external clock |
| D6 | PD6 | Yes | None | PWM output |
| D7 | PD7 | No | None | General-purpose digital I/O |
| D8 | PB0 | No | ICP1 | Input capture unit |
| D9 | PB1 | Yes | None | PWM output |
| D10 | PB2 | Yes | SS | SPI slave select |
| D11 | PB3 | Yes | MOSI | SPI master out, slave in |
| D12 | PB4 | No | MISO | SPI master in, slave out |
| D13 | PB5 | No | SCK, LED | SPI clock and onboard LED |
Analog Pins
| Arduino pin | ATmega328P port | Alternate function | Description |
|---|---|---|---|
| A0 | PC0 | None | Analog input or digital I/O |
| A1 | PC1 | None | Analog input or digital I/O |
| A2 | PC2 | None | Analog input or digital I/O |
| A3 | PC3 | None | Analog input or digital I/O |
| A4 | PC4 | SDA | I2C data, analog input or digital I/O |
| A5 | PC5 | SCL | I2C clock, analog input or digital I/O |
| AREF | None | AREF | External analog reference input |
Power Pins
| Pin | Description |
|---|---|
| VIN | External supply input, 7 V to 12 V recommended |
| 5V | Regulated 5 V rail |
| 3.3V | Regulated 3.3 V output, 50 mA maximum |
| GND | Ground, three pins connected internally |
| RESET | Pull LOW to restart the microcontroller |
| IOREF | I/O voltage reference for shields, 5 V on the UNO |
Conclusion
This guide covered every pin of the Arduino UNO, from the power header to the digital, PWM, analog, UART, I2C, SPI, interrupt and timer pins. The main points are the current limits of the pins, the fixed locations of the serial interfaces and the fact that several pins serve more than one function. A page like this one is most useful as a reference, so keep it bookmarked and return to the pin tables whenever you plan a new circuit.
Browse More Arduino Core Tutorials
Arduino ADC and analogRead() Explained: Complete Guide with Examples
Arduino I2C Tutorial: Wire Library, Master/Slave, Scanner & Troubleshooting
Arduino delayMicroseconds() Tutorial: Precise Timing, Pulses & Alternatives
Arduino PWM and analogWrite() Explained with Examples
Arduino External Interrupts: attachInterrupt(), ISR & Debounce
Arun is an embedded systems engineer with 10+ years of experience in STM32, ESP32, and AVR microcontrollers. He created ControllersTech to share practical tutorials on embedded software, HAL drivers, RTOS, and hardware design — grounded in real industrial automation experience.
Recommended Tools
Essential dev tools
Categories
Browse by platform

















YOU LEFT OUT 12 PINS