Arduino Uno
The classic beginner board
Arduino UNO R3 (A000066) · ATmega328P + ATmega16U2
The board most people learn on: an 8-bit ATmega328P at 16 MHz with 5 V logic, 14 digital pins (6 with PWM), 6 analog inputs, and a second chip that turns USB into the serial port your sketches upload through.
Tested in the SolderHub Simulator. Opens a ready-wired circuit that runs in your browser.
- Digital I/O
- 14
- PWM / Analog in
- 6 / 6
- Clock
- 16 MHz
- Flash / SRAM
- 32 kB / 2 kB
Every header pin at a glance
- 17 safe I/O
- 3 use with care
- 0 avoid
- 0 not available
- 12 power, ground & other
01Pinout
Every pin, live
Search, filter, then hover or tap a pin. The left side is the power and analog header, the right side the two digital headers, in the order they sit on the board.
32 of 32 pins match
Hover or tap any pin on the board
ANALOG IN header · pin 1
A0
Safe to use
10-bit analog input (0 to 1023 across 0 to 5 V). Also works as a normal digital pin.
Nothing else on the board depends on this pin. A good first choice for sensors, LEDs and buttons.
Can be used as
- Analog in
Signals on this pad
- A0
- PC0
- ADC0
Full header tables (POWER, ANALOG IN, DIGITAL 8–13, DIGITAL 0–7)
POWER · left side
| No. | Pin | Signals | Status |
|---|---|---|---|
| 1 | NC | Not connected. | |
| 2 | IOREF | Tells a shield the board's logic voltage. Connected to 5 V on the UNO R3. | |
| 3 | RESET | Pull low to restart the ATmega328P, the same as pressing the reset button. | |
| 4 | 3.3V | 3.3 V supply for low-voltage modules. Logic on the I/O pins is still 5 V. | |
| 5 | 5V | The board's regulated 5 V rail, from USB or the on-board regulator. | |
| 6 | GND | Ground | |
| 7 | GND | Ground | |
| 8 | VIN | Input voltage, the same input as the barrel jack: 7 to 12 V recommended, 20 V absolute maximum. |
ANALOG IN · left side
| No. | Pin | Signals | Status |
|---|---|---|---|
| 1 | A0 | PC0, ADC0 | OK |
| 2 | A1 | PC1, ADC1 | OK |
| 3 | A2 | PC2, ADC2 | OK |
| 4 | A3 | PC3, ADC3 | OK |
| 5 | A4 | PC4, ADC4, SDA | OK |
| 6 | A5 | PC5, ADC5, SCL | OK |
DIGITAL 8–13 · right side
| No. | Pin | Signals | Status |
|---|---|---|---|
| 1 | D8 | PB0, CLKO | OK |
| 2 | D9 | PB1, OC1A, PWM | OK |
| 3 | D10 | PB2, SS, OC1B, PWM | OK |
| 4 | D11 | PB3, MOSI, OC2A, PWM | OK |
| 5 | D12 | PB4, MISO | OK |
| 6 | D13 | PB5, SCK, LED_BUILTIN | Caution |
| 7 | GND | Ground | |
| 8 | AREF | External reference for analogRead() with analogReference(EXTERNAL). Apply 0 to 5 V only. | |
| 9 | SDA | I2C data. The same signal as A4, repeated here for shields. | |
| 10 | SCL | I2C clock. The same signal as A5, repeated here for shields. |
DIGITAL 0–7 · right side
| No. | Pin | Signals | Status |
|---|---|---|---|
| 1 | D0 | PD0, RXD | Caution |
| 2 | D1 | PD1, TXD | Caution |
| 3 | D2 | PD2, INT0 | OK |
| 4 | D3 | PD3, INT1, OC2B, PWM | OK |
| 5 | D4 | PD4, T0 | OK |
| 6 | D5 | PD5, OC0B, PWM | OK |
| 7 | D6 | PD6, OC0A, PWM | OK |
| 8 | D7 | PD7 | OK |
02Safety
Pins to avoid, and why
The UNO has no boot-strapping pins to trip over. Three pins are shared with something on the board.
Use with care
3 pins
Usable, but shared with the USB link or an on-board LED.
- D0Shared with USB. D0 and D1 are the hardware serial port that the USB-to-serial chip talks to. Anything wired here can garble the serial monitor and make sketch uploads fail, so leave them free while you upload.
- D1Shared with USB. D0 and D1 are the hardware serial port that the USB-to-serial chip talks to. Anything wired here can garble the serial monitor and make sketch uploads fail, so leave them free while you upload.
- D13On-board LED. The L LED is wired to D13 (LED_BUILTIN), so it lights whenever the pin is high, including while SPI clocks data. Fine for outputs; pick another pin for a sensitive input.
03Layout
How the board fits together
Two chips do the work: the ATmega16U2 handles USB, the ATmega328P runs your sketch.
USB-B → ATmega16U2
USB-to-serial bridge: uploads and the serial monitor
Barrel jack / VIN
7–12 V into the SPX1117 5 V regulator
ATmega328P
8-bit AVR · 16 MHz · 32 kB flash · 2 kB SRAM
Digital D0–D13
6 PWM, UART, SPI, 2 interrupts
Analog A0–A5
10-bit ADC; A4/A5 are I2C
ICSP header
SPI + reset for an external programmer
04Specs
Full specifications
Microcontroller
- Chip
- Microchip ATmega328P8-bit AVR
- Clock
- 16 MHz
- Flash
- 32 kBPart of it holds the bootloader that lets you upload over USB.
- SRAM
- 2 kB
- EEPROM
- 1 kBKeeps its contents with the power off.
Power
- Logic level
- 5 V
- Barrel jack / VIN
- 7 to 12 V20 V is the absolute maximum, not a working value.
- USB input
- 5.5 V max
- Regulator
- SPX1117M3-L-5 (5 V)
- Current per I/O pin
- 40 mA absolute max200 mA absolute max through the chip's VCC and GND pins in total.
Analog
- Inputs
- 6 (A0 to A5)
- Resolution
- 10-bit0 to 1023, about 4.9 mV per step at 5 V.
- References
- 5 V default, 1.1 V internal, AREFAREF accepts 0 to 5 V only.
- Read time
- About 100 µsRoughly 10,000 readings a second.
Peripherals
- PWM
- 6 pins: D3, D5, D6, D9, D10, D11About 490 Hz; 980 Hz on D5 and D6.
- Serial
- 1 UART on D0/D1Shared with the USB bridge.
- SPI / I2C
- 1 SPI, 1 I2C
- Interrupts
- D2 and D3 externalEvery pin also supports pin-change interrupts.
- Timers
- 2 × 8-bit, 1 × 16-bitPlus a watchdog timer.
Board
- USB
- USB-B connector
- USB bridge
- ATmega16U2Presents the board to your computer as a serial port.
- Programming
- USB bootloader or ICSP6-pin ICSP header for an external programmer.
- Internal pull-ups
- 20 to 50 kΩEnable with pinMode(pin, INPUT_PULLUP).
- Board temperature
- −40 to 85 °C
05Buses
Where each bus lives
Every bus has fixed pins on the UNO. These are the ones the Arduino libraries use.
Serial (UART)
RX on D0, TX on D1. The same port goes to your computer through the ATmega16U2, so the serial monitor and uploads share it.
I2C (Wire)
SDA on A4 and SCL on A5, repeated on the SDA and SCL pins next to AREF. Same signals, so use one pair.
SPI
SS on D10, COPI (MOSI) on D11, CIPO (MISO) on D12, SCK on D13. COPI, CIPO and SCK are also on the 6-pin ICSP header.
PWM (analogWrite)
D3, D5, D6, D9, D10 and D11. Timer0 drives D5/D6 at about 980 Hz; Timer1 (D9/D10) and Timer2 (D3/D11) run at about 490 Hz.
External interrupts
D2 (INT0) and D3 (INT1). Pass the pin through digitalPinToInterrupt() when you call attachInterrupt().
06Power & start
Power it up and get connected
Power options
- USB-B5 V from your computer or a USB charger. Also the upload and serial-monitor connection.
- Barrel jack (2.1 × 5.5 mm)7 to 12 V DC, regulated down to 5 V on the board. 20 V is the absolute maximum.
- VIN pinThe same 7 to 12 V input as the barrel jack, for shields and battery packs.
- 5V and 3.3V pinsOutputs for sensors and modules. The I/O pins stay at 5 V logic, so 3.3 V-only modules need level shifting on their signal lines.
- 1
Install the Arduino IDE and plug in
Connect the UNO with a USB-B cable. The ON LED lights and your computer sees a new serial port.
- 2
Pick the board and port
Tools → Board → Arduino AVR Boards → Arduino UnoThen choose the new port under Tools → Port.
- 3
Upload Blink
arduino-cli compile --upload -p <port> --fqbn arduino:avr:uno BlinkOr File → Examples → 01.Basics → Blink in the IDE. The L LED on D13 starts blinking once a second.
- 4
No board on your desk?
Open the tested UNO circuit in the SolderHub Simulator below and run the same sketches in your browser.
07Versions
Which version do you have?
R4 boards keep 5 V logic and the same main pin numbers but use a 32-bit chip. Check the main chip: the R3 uses an ATmega328P, R4 boards a Renesas RA4M1.
UNO R3
- MCU
- ATmega328P
- Clock
- 16 MHz
- USB
- USB-B
This page. 10-bit ADC, 5 V logic.
UNO R4 Minima
- MCU
- Renesas RA4M1
- Clock
- 48 MHz
- USB
- USB-C
32-bit Cortex-M4, 256 kB flash, 32 kB SRAM, up to 14-bit ADC, 6 to 24 V on VIN. Still 5 V, same PWM, interrupt, I2C and SPI pin numbers.
UNO R4 WiFi
- MCU
- RA4M1 + ESP32-S3
- Clock
- 48 MHz
- Radio
- Wi-Fi, BLE
R4 Minima's chip plus an ESP32-S3 for Wi-Fi and Bluetooth, a 12×8 LED matrix and a Qwiic connector.
08Gotchas
Things that trip people up
01
Upload fails with something on D0 or D1
Those two pins are the serial link to your computer. A module, an LED or a Bluetooth adapter wired there can block uploads and fill the serial monitor with junk. Unplug it while uploading, or move it to other pins with SoftwareSerial.
02
Servo library switches off PWM on D9 and D10
The Servo library takes over Timer1, so analogWrite() on D9 and D10 stops working as soon as you include it, even if no servo is connected there. Put dimmed LEDs and motor speed control on D3, D5, D6 or D11 instead.
03
tone() fights PWM on D3 and D11
tone() uses Timer2, the same timer behind PWM on D3 and D11. A buzzer and a PWM-dimmed LED on those pins will interfere with each other.
04
analogWrite(5, 0) still glows a little
D5 and D6 share Timer0 with millis() and delay(), so their low duty cycles come out slightly high and 0 may not switch them fully off. Use digitalWrite(pin, LOW) for a true off.
05
A4 and A5 are the I2C bus
The SDA and SCL pins near AREF are the same signals as A4 and A5. Once you use I2C (an OLED, an RTC, a BME280…), those two analog inputs are taken, wherever you plug the wires.
06
Pins are not power outputs
40 mA is the absolute maximum per pin, with 200 mA for the whole chip. An LED with a resistor is fine; a motor, relay coil or LED strip needs a transistor, MOSFET or driver board between it and the pin.
09SolderHub Simulator
Wire up the Arduino Uno without the hardware
The simulator runs Arduino Uno sketches in your browser. Start from the tested board circuit, then change the wiring or the code.
- Keypad Password Door Lock4x4 keypad, SG90 servo bolt, I2C LCD, buzzer and status LEDs. Default PIN 1234: press digits, # to confirm, * to clear. Three wrong PINs lock the keypad for 30 s; press A while unlocked to set a new PIN.
- Temperature-Controlled Fan (DS18B20 + L298N)DS18B20 probe on D2, set-point knob on A0, L298N PWM speed control of a 12 V fan, live readout on an I2C LCD. Raise the probe temperature above the set-point and the fan ramps from 35% to full speed.
- Gas Leak & Fire Alarm with Exhaust FanMQ-2 gas sensor on A0, flame sensor on D2, RGB status LED, buzzer siren with mute button, relay-switched exhaust fan and I2C LCD. Raise the smoke level or light a flame in the part settings to trigger WARNING and DANGER.
Board Basics
Introduction, pinout, and protocols — all in one guide.
Sensor Modules & Library
Wiring sensors and modules, plus the library you need to talk to them.
Sensor Integration
Interfacing HC-SR04 Ultrasonic Sensor with Arduino
Library & Setup
Coming soon

Arduino Motion-Activated Night Light with PIR, LDR and Relay

Arduino Smart Dustbin with Automatic Lid and Fill-Level Alert

Arduino Digital Spirit Level with MPU-6050 and OLED

Arduino Gas Leak and Fire Alarm with MQ-2, Flame Sensor and Exhaust Fan

Arduino Temperature-Controlled Fan with DS18B20, L298N and LCD

Arduino Keypad Door Lock with Servo, I2C LCD and Lockout

HC‑SR04 Ultrasound Distance Measurement with Arduino – Parking Alert (LCD & Buzzer)
Getting Started with Arduino Uno R3 — LED Blink Guide
SolderHub Simulator
Arduino Uno circuits you can run in the browser
Ready-wired circuits with working code. Open one, press run, then change the wiring or the sketch.
- Board self-testArduino Uno board testBoard test: LED on D7 follows the button on D2; HC-SR04 (TRIG D8, ECHO D9) and DHT11 (D4) shown on the 1.3" OLED (0x3C) and LCD1602 I2C (0x27) on SDA/SCL; SG90 servo on D5 sweeps 0-180-0. Expected Serial: T=24.0 H=50 D about 100 cm.Open in simulator
- CircuitKeypad Password Door Lock4x4 keypad, SG90 servo bolt, I2C LCD, buzzer and status LEDs. Default PIN 1234: press digits, # to confirm, * to clear. Three wrong PINs lock the keypad for 30 s; press A while unlocked to set a new PIN.Open in simulator
- CircuitTemperature-Controlled Fan (DS18B20 + L298N)DS18B20 probe on D2, set-point knob on A0, L298N PWM speed control of a 12 V fan, live readout on an I2C LCD. Raise the probe temperature above the set-point and the fan ramps from 35% to full speed.Open in simulator
- CircuitGas Leak & Fire Alarm with Exhaust FanMQ-2 gas sensor on A0, flame sensor on D2, RGB status LED, buzzer siren with mute button, relay-switched exhaust fan and I2C LCD. Raise the smoke level or light a flame in the part settings to trigger WARNING and DANGER.Open in simulator
- CircuitDigital Spirit Level (MPU-6050 + OLED)MPU-6050 read directly over I2C, pitch and roll from the gravity vector, a bubble vial on a 0.96-inch SSD1306 OLED, a zero button and a buzzer tick when level. Change the tilt in the MPU-6050 settings.Open in simulator
- CircuitTouchless Smart Dustbin with Fill AlertFront HC-SR04 opens an SG90 lid when a hand comes within 20 cm and closes it smoothly 3 s later; a second HC-SR04 under the lid measures the fill level and blinks a red LED above 85%. Set the sensor distances in their settings.Open in simulator
- CircuitMotion-Activated Night Light (PIR + LDR + Relay)HC-SR501 PIR on D2 and an LDR module on A0 switch a relay lamp only when it is dark and someone moves, then hold it on for 20 s. Wait for the 30 s PIR warm-up, then toggle motion in the PIR settings.Open in simulator
- CircuitHotspot repeaterSaved from SolderHub SimulatorOpen in simulator
- CircuitL298N two-motor testL298N on an Arduino Uno (ENA D9, IN1 D8, IN2 D7, ENB D10, IN3 D12, IN4 D13) with a 9 V motor supply and two DC motors. Runs forward, stop, backward and spin.Open in simulator
- CircuitSG90 servo knobSG90 on an Arduino Uno: signal on D9 with Servo.h, potentiometer on A0. Turn the knob from the potentiometer's Settings and the horn follows.Open in simulator
- CircuitBME280 weather readingsBME280 on an Arduino Uno: 3.3 V supply, A4/A5 through a BSS138 level shifter, address 0x76. The Adafruit BME280 sketch prints temperature, humidity, pressure and altitude. Change the readings from the sensor's Settings.Open in simulator
- CircuitBMP280 weather readingsBMP280 on an Arduino Uno: 3.3 V supply, A4/A5 through a BSS138 level shifter, address 0x76. The Adafruit BMP280 sketch prints temperature, pressure and altitude. Change the readings from the sensor's Settings.Open in simulator
- CircuitHC-SR501 motion lightHC-SR501 PIR on an Arduino Uno (VCC 5V, OUT D2, LED on D8). Counts motion events and keeps the light on for 10 s after the last one. Toggle motion from the sensor's Settings.Open in simulator
- CircuitMPU-9250 pitch and rollMPU-9250 on an Arduino Uno (3.3V, A4 SDA, A5 SCL), AD0 to GND, NCS to 3.3V. A no-library sketch wakes the chip, prints WHO_AM_I, then pitch and roll from the accelerometer. Tilt it from its Settings.Open in simulator
- CircuitMPU-6050 pitch and rollMPU-6050 on an Arduino Uno (3.3V, A4 SDA, A5 SCL), AD0 to GND. A no-library sketch wakes the chip, prints WHO_AM_I, then pitch and roll from the accelerometer. Tilt it from its Settings.Open in simulator
- CircuitMQ-135 gas alarmMQ-135 module (air quality) on an Arduino Uno: AO on A0, DO on D2, buzzer on D8. Learns the clean-air baseline at start-up and sounds the buzzer above it. Raise the gas level from the sensor's Settings.Open in simulator
- CircuitMQ-7 gas alarmMQ-7 module (carbon monoxide) on an Arduino Uno: AO on A0, DO on D2, buzzer on D8. Learns the clean-air baseline at start-up and sounds the buzzer above it. Raise the gas level from the sensor's Settings.Open in simulator
- CircuitMQ-3 gas alarmMQ-3 module (alcohol) on an Arduino Uno: AO on A0, DO on D2, buzzer on D8. Learns the clean-air baseline at start-up and sounds the buzzer above it. Raise the gas level from the sensor's Settings.Open in simulator
- CircuitMQ-2 gas alarmMQ-2 module (gas and smoke) on an Arduino Uno: AO on A0, DO on D2, buzzer on D8. Learns the clean-air baseline at start-up and sounds the buzzer above it. Raise the gas level from the sensor's Settings.Open in simulator
- Circuit1.3-inch OLED live readout1.3-inch I2C OLED on an Arduino Uno (5V, GND, A4, A5) showing a potentiometer on A0 as a big percentage and a bar graph. Turn the knob in the pot's Settings and watch the screen follow.Open in simulator
- CircuitPassive Buzzer ScalePassive buzzer on an Arduino Uno: + on D9, - on GND. tone() plays a C major scale, showing how a passive buzzer follows the pin's frequency.Open in simulator
- CircuitDS18B20 Temperature SensorDS18B20 1-Wire temperature sensor on an Arduino Uno: DQ on D2 with a 4.7 kΩ pull-up to 5V, VDD to 5V, GND to GND. Prints °C and °F to the Serial Monitor every second.Open in simulator
- CircuitLDR Photoresistor Night LightGL5528 LDR in a 10 kΩ divider on A0, LED on D9. Change the LDR lux in its settings and watch the reading and the night light.Open in simulator
- CircuitA3144 Hall Effect SensorA3144 on D2 with INPUT_PULLUP. Toggle the magnet in the part settings and watch the L LED and Serial Monitor.Open in simulator
More From This Board
1More Arduino Uno guides worth reading.

