Home · Academy · Robotics & Coding · Arduino · Boards and Basic Components

Boards and Basic Components

Get to know the Arduino Uno's pins and basic components like LEDs, resistors and buttons.

LESSON COMPASS

What will you use this page for?

Core idea

We get to know the pins and power connections on the Arduino Uno board, and learn what basic components such as the LED, resistor, button, breadboard and jumper wires do.

Evidence to produce

Complete the page task with your own input, test conditions and reasoning.

Control trap

Forgetting the resistor If you connect the LED directly to 5V, too much current flows and the LED can be damaged. Always place a resistor in front of the LED. Connecting the LED backwards The long leg should go to the plus (+) side and the short leg to the GND side. A reversed LED does not light. If it does not light,…

Next connection

Arduino IDE: We will get to know the program where we write and upload code, and send our first sketch to the Arduino.

Module sources: Python Tutorial · Arduino Learn

LevelBeginner
Age10–16
Duration35–50 min
PrerequisiteWhat Is Arduino?
ContentIn-depth guide · 2,053 words
Last updated

One-sentence summary

We get to know the pins and power connections on the Arduino Uno board, and learn what basic components such as the LED, resistor, button, breadboard and jumper wires do.

Why does it matter?

In the previous lesson we saw that Arduino works like a small computer. But a computer has a keyboard and a screen; Arduino has pins. When we want to connect an LED, read a button or listen to a sensor, we do it through the pins.

If we do not know which part of the board does what, the circuit will not work even when our code is correct. For example, if we connect the LED to the wrong pin, nothing happens; if we forget the resistor, the LED can be damaged. This lesson draws the "map" we need before writing any code.

Think of it this way: you cannot play the song you want on a music system without knowing all of its buttons. Arduino is the same. Let us get to know the parts first.

Getting to know the Arduino Uno board

The Arduino Uno is a blue board about the size of your palm. Every section on it has a job. When we hold the board, we can see four main areas: the power input, the digital pins, the analog pins and the processor in the middle.

USB and power input

In one corner of the board there is a rectangular USB port. When we connect this port to a computer, two things happen at once:

Next to the USB there is a round power jack. If we want to work without a computer, we connect a battery pack or an adapter here. In this lesson we will only use low-voltage sources such as USB or a battery pack.

Short definition: A pin is a metal connection point that sticks out of the board and holds a wire. Arduino talks to the outside world through its pins.

Digital pins

Along the long edge of the board there are pins numbered from 0 to 13. These are called digital pins. Digital pins understand only two states: on (HIGH, 5 volts) or off (LOW, 0 volts).

We use digital pins to turn an LED on and off, or to read whether a button is pressed. A digital pin can be set either as an output (to drive something) or as an input (to listen to something).

Some digital pins have a ~ symbol next to them (3, 5, 6, 9, 10, 11). These marked pins can use analogWrite to light an LED at half brightness instead of full brightness. We will come back to this in later lessons.

Analog pins

On the other edge of the board there are pins numbered from A0 to A5. These are called analog pins. Analog pins can read not only on/off, but many values in between.

For example, a light sensor produces a value close to 0 in the dark and close to 1023 in bright light. The analogRead command gives us this in-between value. When we turn a potentiometer (a part that turns like a volume knob), the value also changes slowly.

Power pins: 5V, 3.3V and GND

The board also has special pins with labels on them:

You can think of it like a water pipe: 5V is the flowing end, and GND is the end where the water returns. Without both, the "flow" is not complete.

Basic components

Now let us get to know the parts we will connect to the board. These parts come in a small starter kit.

LED (light-emitting diode)

An LED is a tiny lamp that lights up when current flows through it. It has two legs, and direction matters:

If we connect the LED backwards it will not light, but it will not break. The real mistake is connecting it without a resistor.

Resistor

A resistor is a part that limits current. If too much current reaches the LED, the LED can be damaged. Placing a resistor in the path keeps the current at a safe level.

For one LED we usually use a 220 ohm or 330 ohm resistor. A resistor has no direction; either end works. A resistor is like a seatbelt for the LED.

Button

A push button is a switch that joins two points when you press it. Current flows while it is pressed and stops when you release it. We connect a button to a digital pin and read its state with digitalRead.

Think of a doorbell: it rings while you press it and goes quiet when you let go.

Breadboard

A breadboard is a board full of holes where we build circuits without soldering. The holes are connected inside in a set pattern:

Legs placed in holes of the same group count as connected together. This way we join parts without soldering wires, and we can pull them out and change them whenever we want.

Jumper wires

Jumper wires are colourful wires with metal tips on both ends. We use them to connect the Arduino pins to the breadboard or to components. The colours are only there to make our work easier; by habit we use red for power (+) and black for GND (−).

What is a pin map?

When we write a pin number in the code, we need to know exactly which metal end of the board we mean. The mental picture that shows what each number on the board is for is called the pin map.

Let us connect this with a small example. In the circuit below we connect the LED to digital pin 13:

The code for this circuit looks like this:

// Blinks the LED connected to pin 13
void setup() {
  pinMode(13, OUTPUT);   // pin 13 is an output
}

void loop() {
  digitalWrite(13, HIGH); // turn the LED on
  delay(1000);            // wait 1 second
  digitalWrite(13, LOW);  // turn the LED off
  delay(1000);            // wait 1 second
}

The number 13 in the code points to the physical pin labelled 13 on the pin map. If we plug the wire into pin 12 but write 13 in the code, the LED will not light because the two do not point to the same place. The code and the wire must point to the same pin. This is exactly why the pin map matters.

A second example: let us connect a button to pin 2 and read its state.

// Prints the state of the button on pin 2 to the serial monitor
void setup() {
  pinMode(2, INPUT_PULLUP); // built-in resistor for the button
  Serial.begin(9600);       // start serial communication
}

void loop() {
  int state = digitalRead(2); // read the button
  Serial.println(state);      // print the value
  delay(200);
}

Here too, the number 2 points to the digital pin labelled 2 on the board. If the button is not plugged in, or is plugged into a different pin, the value we read will be misleading.

Mini activity

Draw the matching table below on paper. The components are on the left and the jobs are on the right. Join the correct ones with a line:

Mini activity table
ComponentJob
LED?
Resistor?
Button?
Breadboard?
GND pin?

Job options: "gives light", "limits the current", "closes the circuit when pressed", "lets us build a circuit without soldering", "is the return end of the circuit".

Then, looking at your board (or at a picture of an Arduino Uno), answer these three questions:

  1. Between which numbers are the digital pins?
  2. Which letter is at the start of the analog pin labels?
  3. How many GND pins can you find?

If you do this activity with an adult while holding the real board, you will remember where the pins are much more easily.

Common mistakes

Forgetting the resistor

If you connect the LED directly to 5V, too much current flows and the LED can be damaged. Always place a resistor in front of the LED.

Connecting the LED backwards

The long leg should go to the plus (+) side and the short leg to the GND side. A reversed LED does not light. If it does not light, check the legs first.

Skipping the GND connection

Only 5V is not enough. A circuit is complete only with GND. When something does not work, the missing GND wire is often the reason.

Keeping the code and the wire on different pins

If you write pinMode(13, ...) in the code but plug the wire into pin 12, the circuit will not work. Make sure the numbers match.

Misreading the breadboard rows

Legs placed in holes that are not in the same group are not connected. Before making a connection, think about which holes are shared.

Safety note

Lesson summary

Check questions

  1. Which two states do digital pins understand, and what voltage does each state mean?
  2. What is the main difference between analog pins and digital pins?
  3. Why do we place a resistor in front of the LED?
  4. What is the job of the GND pin in a circuit?
  5. We wrote pinMode(9, OUTPUT) in the code but the LED does not light. In terms of the pin map, what is the first thing you should check?

Answers

  1. Digital pins understand two states: HIGH (on, 5 volts) and LOW (off, 0 volts).
  2. A digital pin reads only on/off (two values), while an analog pin can read many values in between (for example 0–1023).
  3. The resistor limits the current. Without it, too much current flows through the LED and the LED can be damaged.
  4. GND is the return end of the circuit. Every circuit needs a GND connection so that the current can complete its path.
  5. We should check whether the wire is really plugged into pin 9. If the code points to 9, the wire must also be on pin 9; if it is on a different pin, the LED will not light.

Source and verification note

For “Boards and Basic Components”, verification focuses on whether the relationship between Getting to know the Arduino Uno board and Digital pins remains consistent across examples. Pin, voltage and current limits can differ between Arduino-compatible boards. Compiling code does not guarantee a safe circuit; loads such as motors and servos require a suitable driver and external power where appropriate.

Next lesson

Arduino IDE: We will get to know the program where we write and upload code, and send our first sketch to the Arduino.

Start QuizBack to Arduino
QUESTION POOL

Reinforce this lesson with 10 questions

This lesson has a pool of 20 questions. Each attempt selects 10 and reshuffles the choices.