The [Arduino Uno](https://www.ampheo.com/product/a000046-25542493) (based on the [ATmega328P](https://www.ampheo.com/search/ATmega328P) [microcontroller](https://www.ampheo.com/c/microcontrollers)) has the following pin configuration for digital and analog I/O: ![1-3](https://hackmd.io/_uploads/HkrsTukDgl.jpg) **Digital Pins:** Total: 14 pins (labeled D0 to D13). * 6 pins can be used as PWM outputs (marked with ~): D3, D5, D6, D9, D10, D11. * 2 pins support hardware interrupts: D2 (INT0) and D3 (INT1). * Serial communication: D0 (RX) and D1 (TX) for UART. **Analog Pins:** Total: 6 pins (labeled A0 to A5). * These can read analog voltages (0–5V) via the 10-bit ADC (1024 values). * Can also be used as digital I/O (if needed, addressed as D14 to D19). **Other Pins:** **Power Pins:** 5V, 3.3V, GND, VIN (input voltage). **Special Pins:** * AREF (Analog Reference voltage input). * Reset (D0) – Can be used to reset the MCU. **Summary Table** ![企业微信截图_20250724172510](https://hackmd.io/_uploads/S1YWhdyDgg.png) **Example Uses** **1. Digital:** * Read buttons/[switches](https://www.onzuu.com/category/switches) (digitalRead()). * Control LEDs/[relays](https://www.onzuu.com/category/relays) (digitalWrite()). **2. Analog:** Read [sensors](https://www.ampheoelec.de/c/sensors) (potentiometers, LDRs) (analogRead()). **3. PWM:** Dim LEDs, control servo motors (analogWrite()). **Important Notes** * A4 (SDA) and A5 (SCL) are also used for I²C communication. * Avoid using D0/D1 if using serial (UART) communication.