Uni-Sine
Computer ScienceCourses

Micro Controllers: Arduino, ESP32 and Pico for beginners

Micro Controllers is an interactive Arduino course that also covers the ESP32 and the Raspberry Pi Pico. In 26 short sections it goes from what a microcontroller is to a finished night-light project: choosing a board, writing and uploading sketches, digital output, buttons and pull-ups, analog input, the serial monitor, PWM dimming, 5 V and 3.3 V logic, Wi-Fi on the ESP32, UART, I2C and SPI, and power and battery life.

It opens with a sketch that reads a knob, works out a PWM duty and dims an LED, line by line, with the square wave drawn at its real duty: input, decision, output, the shape of every project in the course.

What the course covers

SectionsTopicWhat you do
1 to 4Microcontrollers vs computers, and three popular boardsPick the Uno, ESP32, Pico or Raspberry Pi for each project
5 to 7A tour of the Uno, and writing a sketchFind pins on the Uno's headers
8 to 11Digital output, buttons, pull-ups and bounceMatch a blink sketch to its trace, then code a button
12 to 14Analog input and the serial monitorTurn a reading into a voltage on an Uno or an ESP32
15 to 16PWM: dimming with pulsesWork out an analogWrite value or an average voltage
17 to 185 V and 3.3 V logicSort connections into safe and damaging
19 to 22ESP32 Wi-Fi, and UART, I2C and SPIComplete a Wi-Fi sketch, then wire modules to the right pins
23 to 26Power, sleep and a night light projectWork out battery life, then a mixed review

Sketches and pins

Arduino programs are called sketches, written in the free Arduino IDE 2. Every sketch has a setup() function that runs once and a loop() function that repeats forever. Digital pins are HIGH or LOW, 5 V or 0 V on an Uno; analog inputs turn a voltage into a number with an ADC; and PWM fakes an in-between voltage by switching a pin on and off very fast.

void setup() {
  pinMode(13, OUTPUT);
}

void loop() {
  digitalWrite(13, HIGH);
  delay(500);
  digitalWrite(13, LOW);
  delay(500);
}

Boards and safety

An Uno uses 5 V logic, while the ESP32 and Pico use 3.3 V, so connecting a 5 V signal straight to a 3.3 V pin can damage it. The course has a whole practice on what is safe to connect. The ESP32 adds built-in Wi-Fi and Bluetooth, which is why it suits connected projects.

Talking to modules and running on batteries

Sensors and displays connect over UART (two crossed wires), I2C (two shared wires with addresses) or SPI (more wires, faster). For battery projects, average current sets battery life: hours = capacity ÷ average current.

\text{battery life (h)}=\frac{\text{capacity (mAh)}}{\text{average current (mA)}}

Try a question from the course

Match the board to the job. A simple project that blinks lights and reads buttons suits an Arduino Uno. A sensor that sends readings to your phone over Wi-Fi needs an ESP32, which has Wi-Fi built in. A project that needs a screen, files and a full operating system is a job for a Raspberry Pi, which is a computer rather than a microcontroller.

Now choose a board for a new project, then press Mark to check your answer in the course.

Pick the Uno, ESP32, Pico or Raspberry Pi for each project, with a spec table to read (ChoiceQuiz).

Press Mark to have your answer marked in the Micro Controllers course.

Who this course is for

  • Beginners with an Arduino or ESP32 kit who want to understand what the example sketches actually do.
  • Students on electronics, engineering or design and technology courses building their first controlled project.
  • Makers planning sensors, lights, robots or home gadgets.

What you need to know first

The course page lists Circuits and Programming Languages first: you need resistors, voltage and current, and to be able to read short programs with if statements and loops. A board is not required to follow along, but it makes the course far more fun.

How long it takes

There are 26 sections and most take a few minutes to read; building along takes longer. Learners without a plan can open two sections of a course a day, in order, so the whole course takes 13 days. A plan removes the daily limit and lets you go straight to any topic, such as PWM or Wi-Fi.

Guided courseRaspberry Pi'sWhen a project needs a full computer: set up a Pi, use Linux and control its GPIO pins with Python.

Common questions

Is this Arduino course free?
You can take every section without paying, two sections a day, in order. A plan removes the daily limit and opens any section straight away. Boards and parts are bought separately.
What is the difference between a microcontroller and a microprocessor?
A microcontroller puts the processor, memory and input and output pins on one chip and runs one program directly. A microprocessor, like a laptop's, is only the processor, and needs separate memory, storage and an operating system.
Should I start with an Arduino Uno, ESP32 or Raspberry Pi Pico?
The Uno is the classic beginner board with 5 V pins and huge numbers of examples. The ESP32 adds Wi-Fi and Bluetooth for connected projects. The Pico is a low-cost board that also runs MicroPython. The course compares all three.
What is PWM on an Arduino?
Pulse width modulation: switching a pin on and off very quickly so the average voltage falls between 0 and 5 V. It is how analogWrite dims an LED or controls a motor's speed.
What does a pull-up resistor do?
It holds an input pin HIGH when a button is not pressed, so the reading does not drift. Arduino boards have one built in, switched on with INPUT_PULLUP.
Do I need to know C++ for Arduino?
Arduino sketches are written in a simplified form of C++, but you only need a small part of it. The course explains every line of the example sketches.

Revision cards

Say the answer first, then flip the card to check it.

Where to go next

  • Solve it

    Circuit Builder

    Build any DC circuit with meters, lamps, LEDs and sensors, and see live readings

    Open the tool
  • Learn it

    Micro Controllers

    Arduino, ESP32 and programming hardware at the lowest level

    Start the course
Read next
Computer Science · ElectronicsWhat is Arduino? Uno, pins, IDE and Arduino vs ESP32What Arduino is, how the Uno and its pins work, the Arduino IDE, the limits of Arduino, and the difference between Arduino and ESP32.