Sub topic 1
A Tour of the Arduino Uno Board
Prerequisites
This chapter assumes you understand basic voltage, current, and resistance. You should also know the Arduino IDE and the setup() and loop() structure of a sketch. You should be able to follow a simple breadboard diagram.
The Arduino Uno R3 is a development board built around a microcontroller. A development board combines the microcontroller with power circuits, connectors, a USB interface, and headers that make the pins easy to use.
The main parts
The microcontroller is the large integrated circuit in the center of the board. It runs your sketch and controls the input and output pins. On the Uno R3, this chip is an ATmega328P.
The headers are the rows of labeled pins around the board. Use the labels printed on the board rather than relying only on physical position.
| Board area | What it provides | Typical use |
|---|---|---|
| Digital pins 0–13 | Digital input or output | Buttons, LEDs, switches |
| Analog pins A0–A5 | Voltage measurements | Potentiometers, light sensors |
| Power header | 5V, 3.3V, VIN, GND, and related pins | Supplying or distributing power |
| USB connector | Power and computer communication | Uploading sketches and Serial data |
| Barrel jack | External input power | Running without a USB cable |
The digital pins read or produce two main logic states: HIGH and LOW. Pin 13 is connected to the built-in LED, so it is useful for a first hardware test. Some digital pins also support PWM, shown by a tilde (~) on the board. PWM lets a sketch control the average power delivered to an output, such as the apparent brightness of an LED.
The analog header contains pins A0 through A5. These pins connect to the microcontroller’s analog-to-digital converter, or ADC. The ADC changes a measured voltage into a number that a sketch can process. On a standard Uno, a reading normally ranges from 0 to 1023.
The power header includes several different connections. 5V and 3.3V are regulated supply outputs. GND is the common electrical reference. VIN is associated with external input power. IOREF indicates the board’s logic voltage, and AREF can provide a reference for analog measurements. Their exact safe use depends on how the board is powered.
How the parts connect
Reading the board labels
Pin numbers identify electrical connections, not a sequence of programming tasks. For example, digitalRead(2) refers to digital pin 2, while analogRead(A2) refers to analog input A2. Check the board label and documentation before wiring a component.
The reset button restarts the microcontroller. The nearby indicator LEDs show activity such as power, pin 13 output, and USB serial communication. The USB-to-serial hardware lets the computer exchange data with the sketch and helps upload new programs.
Exercise
Which board area should you choose for a potentiometer, and which area should you choose for a button?
Show answer
Use an analog pin such as A0 for the potentiometer and a digital pin such as 2 for the button.