All 16 Arduino Lessons
Sixteen beginner lessons, in the order they are meant to be built. Each one is a single new idea on top of the last: a pin, a resistor, an input, a sensor, a motor. Everything uses parts from a standard starter kit.
Every lesson exists twice — as a written guide here, and as an interactive 3D board where you wire the circuit and run the sketch without buying anything. The written guide is the one to keep open while you solder.
-
Lesson 1 · 15 min
Arduino Uno Pinout
Every pin on the Uno: 14 digital, 6 analog, 6 PWM, plus power and ground.
The Arduino Uno R3 has 20 input/output pins: 14 digital pins (D0–D13, six of which also do PWM) and 6 analog inputs (A0–A5, 10-bit, reading 0–1023 across 0–5 V), plus 5 V, 3.3 V, VIN, two GND pins and RESET.
-
Lesson 2 · 15 min
Blink an LED on Arduino
The first circuit: pin 13, a 220 Ω resistor, and a sketch that blinks.
To blink an LED on an Arduino, connect the long leg (anode) through a 220 Ω resistor to pin 13 and the short leg to GND, then switch the pin HIGH and LOW with digitalWrite() and pause between the two with delay().
-
Lesson 3 · 20 min
Arduino Push Button
Pull-down resistor, digitalRead(), and why a floating pin makes an LED flicker.
A push button on an Arduino is wired as a switch between a pin and either 5 V or ground, with a 10 kΩ resistor holding the pin at a known level when the button is open; the sketch reads it with digitalRead().
-
Lesson 4 · 15 min
Arduino Potentiometer
Read 0–1023 with analogRead() and dim an LED with analogWrite().
A potentiometer is a three-terminal variable resistor used as a voltage divider: on an Arduino, the outer legs go to 5 V and GND, the middle leg (wiper) goes to an analog pin, and analogRead() returns 0 at one end and 1023 at the other.
-
Lesson 5 · 20 min
Arduino RGB LED
Three PWM channels, one resistor each, and 16.7 million colours.
An RGB LED is three LEDs in one package — red, green and blue — each with its own series resistor on a PWM pin, so analogWrite() values from 0 to 255 per channel mix about 16.7 million colours.
-
Lesson 6 · 20 min
Arduino Light Sensor
An LDR and a 10 kΩ divider turn room brightness into a night light.
An LDR (light-dependent resistor) falls from about 1 MΩ in darkness to 10–20 kΩ in daylight; in a voltage divider with a fixed 10 kΩ resistor it turns light level into a 0–1023 reading on an analog pin.
-
Lesson 7 · 25 min
Arduino Ultrasonic Sensor
HC-SR04 distance in centimetres: echo time ÷ 58, measured with pulseIn().
The HC-SR04 measures distance by timing an echo: distance in centimetres = echo time in microseconds ÷ 58, because sound takes about 29 µs to travel one centimetre each way.
-
Lesson 8 · 15 min
Arduino Buzzer
Passive versus active buzzers, real note frequencies, and tone().
A passive piezo buzzer plays any frequency you feed it with tone(pin, hertz), while an active buzzer has its own oscillator and only beeps at one fixed pitch when powered.
-
Lesson 9 · 30 min
Build an Arduino Piano with Eight Buttons
Eight keys on INPUT_PULLUP and one buzzer play a full octave.
An Arduino piano uses eight buttons on pins 2–9 with INPUT_PULLUP, one piezo buzzer on pin 10, and an array of note frequencies so each key plays tone() at its own pitch.
-
Lesson 10 · 25 min
Control a DC Motor with Arduino and a Transistor
A TIP120, a flyback diode and PWM: speed control without frying the board.
An Arduino pin cannot supply the 200 mA or more a DC motor draws, so a transistor (TIP120) switches the motor’s current while the pin only provides about 1 mA into the base, and a flyback diode absorbs the voltage spike when the motor stops.
-
Lesson 11 · 25 min
Arduino Temperature Sensor
TMP36 to degrees in one line, then a thermostat that switches a fan.
The TMP36 outputs 750 mV at 25 °C and changes by 10 mV per °C, so on a 5 V Arduino the temperature in °C is (analogRead(A0) × 5.0 / 1023 − 0.5) × 100.
-
Lesson 12 · 20 min
Arduino Servo Motor
Three wires, the Servo library, and why the servo needs its own 5 V.
A servo motor holds a commanded angle: on an Arduino you attach it with the Servo library, and servo.write(angle) sends a 0.5–2.4 ms pulse every 20 ms that sets the position between 0° and 180°.
-
Lesson 13 · 35 min
Arduino Stepper Motor
28BYJ-48 and ULN2003: 2048 steps per turn and exact positions.
A 28BYJ-48 stepper motor takes 2048 half-steps for one full revolution (64 steps × a 32:1 gearbox), and an Arduino drives it through a ULN2003 board using four pins, one per coil.
-
Lesson 14 · 35 min
Arduino Soil Moisture Sensor with an OLED Display
Capacitive probe calibration, 0–100 % on an OLED, no corroding electrodes.
A capacitive soil moisture sensor outputs an analog voltage that falls as soil gets wetter — roughly 2.5 V in dry air and 1.3 V in water — so map(reading, DRY, WET, 0, 100) turns it into a percentage.
-
Lesson 15 · 30 min
Arduino Force Sensor (FSR 402)
FSR 402 pressure, the divider formula, and a servo-driven strength gauge.
An FSR 402 falls from over 1 MΩ untouched to a few hundred ohms under firm pressure, and in a 10 kΩ voltage divider an Arduino reads that as a number that rises quickly for light touches and slowly for hard ones.
-
Lesson 16 · 30 min
Arduino Uno Projects
The whole course in one build: distance sensor plus traffic light.
This project combines an HC-SR04 distance sensor with a red-yellow-green traffic light module: the Arduino measures the gap and lights exactly one lamp — red under 15 cm, yellow to 30 cm, green beyond.
Prefer to learn by dragging wires? The 3D board runs the same 16 lessons in the browser.
Open the boardAll 16 lessons last updated 17 November 2026.