Overview
Before wiring anything, know what each socket does. This page is the reference the other tutorials point back to. It covers the Uno R3 with the ATmega328P; differences on the Uno R4 are noted at the end.
Digital pins 0–13
Each can be an input or an output and works at 5 V logic. Pins
3, 5, 6, 9, 10 and 11 support PWM through analogWrite() (marked ~ on the
board). Pins 0 (RX) and 1 (TX) carry the USB serial link; anything connected to them can
block uploads, so leave them free unless you know you need them. Pins 2 and 3 are the two
external-interrupt pins. Pin 13 also drives the on-board "L" LED.
Analog pins A0–A5
These feed the 10-bit analog-to-digital converter, so
analogRead() returns 0–1023 for 0–5 V. They also work as ordinary digital pins (numbers
14–19). A4 and A5 double as the I²C bus (SDA and SCL).
Power pins
| Pin | What it is |
|---|---|
| 5V | Regulated 5 V. On USB, limited by a resettable 500 mA fuse shared with the board itself. |
| 3.3V | From a small on-board regulator; plan on no more than 50 mA. |
| Vin | The raw input from the barrel jack (7–12 V recommended). Not useful when powered by USB alone. |
| GND | Ground. There are several; they are all connected. |
| IOREF | Tells shields the logic voltage (5 V on an Uno). |
| AREF | Optional external reference for the ADC. Leave unconnected unless you call analogReference(EXTERNAL). |
Current limits
- Per pin: design for 20 mA or less. The ATmega328P datasheet gives 40 mA as an absolute maximum, which is a damage threshold, not a working value.
- Whole chip: keep the total of all pins under about 200 mA.
- Motors, servos, relays and long LED strips never run directly from an I/O pin. Use a transistor, driver chip or separate supply.
Uno R4 differences
The Uno R4 Minima and R4 WiFi keep the same header layout and 5 V logic, but their pins are rated for far less current (about 8 mA per pin). The LED projects on this site still work if you use 470 Ω–1 kΩ resistors. The ADC defaults to 10-bit for compatibility.