Education › Robotics › Stage 1: Foundations — get started

Boards: Arduino, ESP32 and Raspberry Pi

Microcontroller vs microcomputer, which board to start on, and the toolchain to program it.

Beginner ~32 min read Module 3 of 16

The brain of your robot is a small board, and the first real decision you make is which one. Beginners waste money and time here by buying the wrong thing — a Raspberry Pi to blink an LED, or an Arduino to run computer vision. This lesson explains the difference between a microcontroller and a microcomputer, compares the three boards you will actually choose between, tells you which to start on and why, and walks through the toolchain so your first upload works.

After this module you can
  • Explain the difference between a microcontroller and a single-board computer
  • Compare the Arduino Uno, ESP32 and Raspberry Pi and say what each is for
  • Choose the right first board for a beginner and justify it
  • Understand GPIO pins and the basic upload toolchain

Microcontroller vs microcomputer

There are two kinds of board, and confusing them is the classic beginner mistake. A microcontroller (like an Arduino) is a single chip that runs one program directly on the metal — no operating system, no desktop. You power it on and your code runs instantly and forever, reacting to pins in microseconds. It is cheap, rugged, sips power, and is perfect for reading sensors and driving motors in real time. A single-board computer (like a Raspberry Pi) is a full computer: it boots Linux, runs many programs, connects to a screen, and can do heavy work like computer vision — but it is pricier, hungrier for power, and its timing is not real-time because the operating system is juggling tasks.

The practical split: use a microcontroller for real-time control (motors, sensors, anything that must respond within milliseconds) and a microcomputer for heavy thinking (vision, mapping, running ROS 2, talking to the cloud). Advanced robots often use both — a Pi as the brain that plans, and an Arduino as the reflexes that drive the motors. But you start with just one.

The three boards you'll choose between

In practice, almost every hobby robot starts with one of three boards. Here is the honest comparison.

BoardIt isBest for
Arduino UnoA simple microcontrollerLearning, real-time control, reliability
ESP32A microcontroller with Wi-Fi/BluetoothWireless robots, more power, tiny price
Raspberry PiA Linux computerVision, ROS 2, heavy processing

The Arduino Uno is the teaching classic: dead simple, forgiving of mistakes, endlessly documented, and it runs on 5 V logic that matches most beginner sensors. The ESP32 is the value champion — for a couple of dollars you get a faster microcontroller with built-in Wi-Fi and Bluetooth, so your robot can be controlled from your phone; its trade-off is 3.3 V logic and a slightly steeper start. The Raspberry Pi is a real computer, essential once you want a camera and vision, but overkill and fiddly for blinking lights and spinning motors.

Note

ESP32 and Raspberry Pi Pico boards use 3.3 V logic; the Arduino Uno uses 5 V. This matters when wiring sensors: feeding a 3.3 V pin 5 V can damage it. Note your board's logic level and match your components to it.

Which board should you start on?

For your very first robot, start with an Arduino Uno (or a clone). Not because it is the most powerful — it is the least — but because it is the best teacher. Its simplicity means fewer things go wrong, its 5 V logic matches the cheap sensors in every starter kit, and there is a tutorial for literally everything. You will learn the fundamentals — pins, timing, sensor reading, motor control — with the least friction. Once those click, moving to an ESP32 for wireless or a Pi for vision is easy, because the concepts carry over.

If you already know some programming and want the best value, an ESP32 is a defensible first board too — it is cheaper than an Uno and does far more. The one board *not* to start on is the Raspberry Pi alone: it is a computer, so you will spend your first week on Linux and networking instead of robotics. Get to the Pi when you reach vision, not before.

Pins and the toolchain

The row of pins along the board is how it touches the world. GPIO (general-purpose input/output) pins can each be an input (read a button or sensor) or an output (light an LED, signal a motor driver). Some pins do extra tricks: PWM pins can fake an analog output to dim an LED or set a motor's speed, and analog pins can read a varying voltage like a light sensor. You will refer to pins by number in code.

cpp
// Read a button on pin 2, light an LED on pin 13 when pressed.
const int BUTTON = 2;
const int LED = 13;

void setup() {
  pinMode(BUTTON, INPUT_PULLUP);  // built-in resistor holds it HIGH until pressed
  pinMode(LED, OUTPUT);
  Serial.begin(9600);             // open a channel to your computer
}

void loop() {
  int pressed = (digitalRead(BUTTON) == LOW);  // LOW means pressed with a pull-up
  digitalWrite(LED, pressed ? HIGH : LOW);
  Serial.println(pressed);        // watch values in the Serial Monitor
}

The toolchain is simple: install the free Arduino IDE, pick your board and port from the menus, write the sketch, and press upload. The IDE compiles your code and flashes it over USB. The Serial Monitor — the window that prints what Serial.println sends — is your single most important debugging tool; when a robot misbehaves, printing sensor values is how you find out what it is actually seeing.

Hands-on practice

Pick your board and test it

  1. Write one sentence each on when you would reach for an Arduino Uno, an ESP32, and a Raspberry Pi.
  2. Decide which board you will start on and note the reason in terms of your first project.
  3. Install the Arduino IDE, connect a board (or a clone), and select the correct board and port.
  4. Upload the blink sketch, then modify it to read a button and print its state to the Serial Monitor.
  5. Check your board's logic level (3.3 V or 5 V) and list which sensors in your kit match it.
Cheat sheet

Boards: Arduino, ESP32 and Raspberry Pi — at a glance

Main things to focus on

  • Microcontroller = one program on the metal, real-time; microcomputer = Linux, heavy work.
  • Start on an Arduino Uno: simplest, best-documented, 5 V matches cheap sensors.
  • ESP32 adds Wi-Fi/Bluetooth for a couple of dollars, at 3.3 V logic.
  • Reach for a Raspberry Pi only when you need vision or ROS 2.
  • GPIO pins are input or output; PWM pins fake analog for dimming and motor speed.
  • The Serial Monitor is your primary debugging tool — print what the robot sees.

The boards

Arduino Unosimple 5 V microcontroller; best first board
ESP32cheap microcontroller with Wi-Fi/Bluetooth, 3.3 V
Raspberry Pia Linux computer; for vision and ROS 2
Pi PicoRaspberry's tiny 3.3 V microcontroller (not the full Pi)

Pin types

GPIOgeneral input or output — read or drive a pin
PWMfakes analog output: dimming, motor speed
Analog inreads a varying voltage (light, potentiometer)
GND / 5V / 3V3power and ground pins

Toolchain

Arduino IDEfree editor that compiles and uploads sketches
Board & Portselect both before uploading
Uploadflashes the sketch over USB
Serial Monitorprints Serial.println output for debugging

Concepts

Microcontrollerone program, no OS, real-time (Arduino, ESP32)
Microcomputerboots Linux, runs many programs (Raspberry Pi)
Logic levela board's pin voltage: 3.3 V or 5 V — match your parts

Common pitfalls

  • Starting on a Raspberry Pi alone, then losing a week to Linux instead of robotics.
  • Wiring a 5 V sensor signal into a 3.3 V board pin and damaging it.
  • Forgetting to select the right board or port, so the upload silently fails.
  • Using a Raspberry Pi for tight real-time control, where the OS ruins the timing.
  • Debugging blind instead of printing sensor values to the Serial Monitor.
Quiz

Check your understanding

5 questions · 4 to pass · answers are explained as you go. Your best score is saved on this device only.

Progress and quiz scores are saved in this browser only. Back up or restore on the hub.

Was this lesson useful? Tell me what to improve →