Arduino Uno All Pins Explained with Functions (Complete Guide)
Arduino Uno All Pins Explained in Detail
The Arduino Uno is a microcontroller board based on the ATmega328P. It has a total of 28 I/O pins (including power and special function pins). Here's a complete breakdown of each pin and its purpose.
1. Digital Pins (0–13)
There are 14 digital I/O pins on the Arduino Uno, numbered from 0 to 13. These pins can be configured as either input or output using pinMode()
, digitalWrite()
, and digitalRead()
.
- Pin 0 (RX): Receive data (used for serial communication)
- Pin 1 (TX): Transmit data (used for serial communication)
- Pin 2: Digital I/O
- Pin 3: PWM output (also digital I/O)
- Pin 4: Digital I/O
- Pin 5: PWM output (also digital I/O)
- Pin 6: PWM output (also digital I/O)
- Pin 7: Digital I/O
- Pin 8: Digital I/O
- Pin 9: PWM output (also digital I/O)
- Pin 10: PWM & SPI (SS - Slave Select)
- Pin 11: PWM & SPI (MOSI - Master Out Slave In)
- Pin 12: SPI (MISO - Master In Slave Out)
- Pin 13: SPI (SCK - Serial Clock) & built-in LED
2. Analog Pins (A0–A5)
There are 6 analog input pins on the Arduino Uno. These can read voltage between 0V and 5V and convert it into a value between 0 and 1023.
- A0 to A5: Analog input pins
- A4 (SDA): I2C data line
- A5 (SCL): I2C clock line
3. PWM Pins
Pulse Width Modulation allows the board to simulate analog output. The following digital pins support PWM:
- Pins: 3, 5, 6, 9, 10, 11
- Used for motor control, LED dimming, etc.
4. Power Pins
- 3.3V: Provides 3.3 volts for low-voltage components
- 5V: Supplies 5 volts from the regulator
- GND (Ground): Common ground (multiple available)
- Vin: Input voltage from external source (7-12V)
- RESET: Reset the microcontroller manually
- IOREF: Provides voltage reference for the I/O pins
5. Communication Pins
These pins are used for serial and parallel communication with other devices:
- UART: Pin 0 (RX) and Pin 1 (TX)
- I2C: A4 (SDA) and A5 (SCL)
- SPI: Pins 10 (SS), 11 (MOSI), 12 (MISO), 13 (SCK)
6. Special Pins
- AREF: Analog Reference pin. Used to set an external reference voltage (0 to 5V) for analog inputs.
- RESET: Can be used to reset the board via a connected button or circuit.
Arduino Uno Pin Summary Table
Pin | Function |
---|---|
0 (RX) | Digital I/O, UART Receive |
1 (TX) | Digital I/O, UART Transmit |
2–13 | Digital I/O (some support PWM or SPI) |
A0–A5 | Analog Input (A4 & A5 support I2C) |
3, 5, 6, 9, 10, 11 | PWM output |
10–13 | SPI Communication |
3.3V, 5V, GND, Vin | Power Supply |
AREF | Analog Reference |
RESET | Reset the board |
IOREF | I/O Voltage Reference |
Conclusion
Understanding the purpose of every pin on the Arduino Uno gives you full control over how to use the board in any electronics project. From powering sensors to communicating with other devices, these pins are the core of Arduino functionality. Bookmark this post for quick reference!