Learning guides / Start from the mechanism

Robotics tutorials for understanding, not memorizing

Focused guides that connect the theory to a real algorithm, circuit decision, or interactive simulator. Each one is self-contained and links to the lab where you can try it.

Browse by topic

Intermediate · 25 min

Friction, Force Closure and Why Two Contacts Is a Bet

Why the object squirts out however hard you squeeze, and what the friction cone actually says.

Read tutorial

Intermediate · 35 min

A Pick-and-Place State Machine That Survives Failure

Approach, grasp, verify, lift, place — and what to do when the verify says no.

Read tutorial

Beginner · 30 min

Robot Gripper Types and How to Size Grip Force

Pick the gripper type, then size the force with the term everyone forgets: acceleration.

Read tutorial

Intermediate · 30 min

Servo Gripper Force, Stall and Why Compliance Wins

The knob is a position, the walls are forces, and stiffness is the exchange rate between them.

Read tutorial

Intermediate · 25 min

Field-Oriented Drive: Make Forward Mean Forward

Rotate the stick by minus the heading, and the robot stops arguing with the driver.

Read tutorial

Beginner · 25 min

Holonomic Drives: Omni, Mecanum, Swerve Compared

Four drivetrains, three degrees of freedom, and what each one charges you for them.

Read tutorial

Intermediate · 35 min

Mecanum Wheel Kinematics: Four Wheels, Three Axes

One roller at 45° gives you the whole matrix — and a fourth equation nobody uses.

Read tutorial

Intermediate · 35 min

Closed-Loop Wheel Velocity Control With Encoders

Feedforward does the work, the integrator cleans up, and the robot finally drives straight.

Read tutorial

Beginner · 30 min

A4988 Wiring and Vref: Set the Stepper Current Limit

The one adjustment that decides whether your stepper works or burns: setting Vref with a multimeter.

Read tutorial

Intermediate · 30 min

Homing With Endstops: Machine and Work Coordinates

Why every CNC machine drives into a switch on startup, and what the number it sets actually means.

Read tutorial

Intermediate · 35 min

How Stepper Motors Work: Lag Angle and Step Loss

The lag angle is the whole of stepper motor behaviour. Learn it once and step loss stops being mysterious.

Read tutorial

Beginner · 25 min

Steps Per Millimetre: Belts, Lead Screws, Resolution

One number ties pulses to millimetres. Derive it, then prove it with a measurement.

Read tutorial

Beginner · 20 min read

Build a Line Follower Robot: Sensors to PID Steering

From IR reflectance sensors to a weighted error to smooth PID steering—how a line follower actually works.

Read tutorial

Intermediate · 45 min

From cmd_vel to Wheel Speeds: ROS 2 Differential Drive

Convert a Twist into left and right wheel speeds — kinematics, saturation, deadband, and a watchdog.

Read tutorial

Intermediate · 14 min read

Detecting Line Maze Junctions With an IR Array

Classify T, cross, left, right, dead end and finish from a reflectance array, and resolve the ambiguous cases.

Read tutorial

Intermediate · 20 min read

Differential-Drive Odometry from Wheel Encoders

Integrate left and right wheel motion into a mobile robot pose, then identify and calibrate drift.

Read tutorial

Intermediate · 16 min read

Flood Fill Maze Solving for Micromouse Robots

How flood fill turns a partly-known maze into a distance field a robot can descend to the goal.

Read tutorial

Advanced · 22 min read

Inverse Kinematics of a Two-Link Robot Arm

Why a two-link arm has two solutions, where it can and cannot reach, and what a singularity really is.

Read tutorial

Beginner · 22 min

The Obstacle-Avoidance Algorithm: Sense, Scan, Decide, Turn

The sense–scan–decide–turn loop that lets a robot avoid obstacles on its own.

Read tutorial

Beginner · 20 min

Read an HC-SR04 Ultrasonic Sensor: Reliable Distance in Code

Turn ping-and-echo into a steady distance in cm—with a timeout and a median filter.

Read tutorial

Beginner · 20 min

Read an IR Reflectance Sensor Array for Line Following

Turn a row of IR sensors into a single, smooth line position you can steer on.

Read tutorial

Beginner · 17 min read

Sensor Noise, Bias, and Filtering in Robotics

Noise vs bias vs drift, choosing a filter without over-smoothing, and what sensor fusion can and cannot do.

Read tutorial

Beginner · 18 min

Servo-Scan an Ultrasonic Sensor to Find Open Space

Sweep an HC-SR04 on a servo to find the clearest direction before you turn.

Read tutorial

Beginner · 18 min read

How to Tune a PID Controller: A Practical Guide

A hands-on order for tuning P, I, and D gains without the guesswork—and how to try each step live.

Read tutorial

Intermediate · 25 min

Cross-Track Error: Measuring How Well You Follow

One signed distance tells you everything about a path follower — including which one to use.

Read tutorial

Intermediate · 30 min

GPS Waypoint Navigation for an Outdoor Robot

A GPS fix is late, noisy and has no heading. Here is what to do about each of those.

Read tutorial

Intermediate · 30 min

Pure Pursuit: Following a Path With One Knob

Aim at a point ahead on the path and drive the arc that reaches it. That is the whole algorithm.

Read tutorial

Beginner · 25 min

Bump Sensors and Debouncing for Robot Collisions

One press, nine transitions — and the interrupt counts every one of them.

Read tutorial

Intermediate · 30 min

Coverage Path Planning: Sweep a Whole Floor

Why a robot with no map needs seven times the distance to finish the same room.

Read tutorial

Intermediate · 25 min

How Hard a Robot Can Push: Traction and Weight

Two ceilings set push force, and on a small robot the floor is almost always the lower one.

Read tutorial

Intermediate · 25 min

Stopping at an Edge: Latency and Braking Distance

How far a robot travels past the line it just saw, and the speed that makes it fit.

Read tutorial

Beginner · 30 min

Reading Analog Voltages: ADC References and Dividers

analogRead gives you a ratio, not a volt. Get the reference right and the divider follows.

Read tutorial

Intermediate · 35 min

How to Choose a DC Gearmotor: Torque, RPM and Stall

Work out the torque and RPM your robot actually needs, then read a datasheet against real numbers.

Read tutorial

Intermediate · 30 min

Gearbox Backlash in Robots: How to Measure and Fix It

Every gearbox has play. Find out how much yours has, and what it is quietly costing your robot.

Read tutorial

Beginner · 30 min

How the I2C Bus Works: Addresses and Pull-Up Resistors

Every sensor page says connect SDA and SCL. This is what those two wires are really doing.

Read tutorial

Beginner · 30 min

Why delay() Breaks Robots: Timing With millis()

A robot sitting in delay() is blind. Replace it with millis(), and get the rollover comparison right.

Read tutorial

Beginner · 30 min

Why Your Robot Resets When the Motors Start

The reset that looks like a code bug is almost always the battery. Budget the current, then measure the sag.

Read tutorial

Intermediate · 30 min

Wheel Slip: Why Odometry Drifts and How to Fight It

Every odometry page says slip ruins the estimate. This is what slip is and what it costs.

Read tutorial

Beginner · 30 min

8051 Architecture: Pins, Memory Map, and Registers

Harvard core, four ports, 256 bytes of RAM, and timing you can count in machine cycles.

Read tutorial

Intermediate · 15 min read

LSRB Path Simplification for Line Maze Robots

Record turns as L, S, R and B, then collapse every dead-end detour into the optimal route.

Read tutorial

Beginner · 28 min

8051 GPIO and Port Interfacing: Sink, Don't Source

Why 8051 LEDs are wired backwards, why you write 1 before reading, and what a port can drive.

Read tutorial

Intermediate · 35 min

8051 Timers and Software PWM for Motor Control

Build PWM from a Timer 0 interrupt, pick the frequency-resolution trade, and drive an H-bridge.

Read tutorial

Intermediate · 35 min

Lidar for Robots: What a Scan Gives You and How It Becomes a Map

A scan is not a snapshot: sampling gaps, motion smear, and the ray casting that turns range data into a map.

Read tutorial

Beginner · 1 hour

Install ROS 2 on a Raspberry Pi and Build a Workspace

Choose the OS, install ROS 2 from apt, build a colcon workspace, and get a laptop talking to the robot.

Read tutorial

Intermediate · 40 min

Motion Profiles: Trapezoidal and S-Curve Acceleration

Ramp a move instead of commanding it — trapezoidal profiles, jerk limits, and what S-curve actually costs.

Read tutorial

Intermediate · 25 min

Robot Arm Types: Cartesian, SCARA, Delta and 6-Axis

Four architectures compared by workspace, stiffness and speed — and the kinematics duality between them.

Read tutorial

Beginner · 1 hour

Control a Robot Over Bluetooth With an HC-05 Module

Pair an HC-05 with your phone and drive a robot over Bluetooth serial, without the classic 5 V mistake.

Read tutorial

Advanced · 2 hours

Cascaded PID Control for a Self-Balancing Robot

Two nested PID loops: one holds the tilt angle, one asks for a lean so the robot can go somewhere.

Read tutorial

Intermediate · 1 hour

Complementary Filter: Fusing Accelerometer and Gyro Data

Fuse a noisy accelerometer with a drifting gyro into one trustworthy tilt angle, in a single line of code.

Read tutorial

Intermediate · 1.5 hours

Drive a Robot From a Browser With an ESP32 Web Server

Serve a control page straight from an ESP32 so any browser can drive the robot — no app needed.

Read tutorial

Beginner · 45 minutes

Reading Tilt Angle From an MPU6050 Accelerometer and Gyro

Turn raw MPU6050 counts into a tilt angle in degrees, and learn why neither sensor works alone.

Read tutorial

Intermediate · 1.5 hours

Wall Following and Precise Turns for a Maze Robot

Stay centred between walls, and turn exactly 90° — the two skills a maze robot lives or dies by.

Read tutorial

Intermediate · 18 min read

Drive Servos with the PCA9685 (I²C PWM Driver)

Set the frequency, turn angles into pulse widths, and move sixteen servos from two I²C pins — safely powered and calibrated.

Read tutorial

Intermediate · 21 min read

A* Path Planning on an Occupancy Grid

Build and validate an A* grid planner with safe heuristics, obstacle inflation, and route reconstruction.

Read tutorial

Intermediate · 22 min read

Camera Calibration and ArUco Pose with OpenCV

Calibrate camera intrinsics, validate reprojection error, and estimate an ArUco marker's 3D pose.

Read tutorial

Beginner · 18 min read

Control DC Motors with PWM and an H-Bridge

Wire and control a brushed DC motor safely using PWM, an H-bridge, and realistic current limits.

Read tutorial

Beginner · 17 min read

Finite-State Machines for Robot Behavior

Replace tangled robot conditionals with explicit states, events, transitions, timeouts, and recovery.

Read tutorial

Beginner · 17 min read

Read Quadrature Encoders for Distance and Speed

Turn quadrature encoder pulses into reliable wheel direction, distance, and velocity measurements.

Read tutorial

Beginner · 19 min read

ROS 2 Nodes, Topics, Services, and Actions

Choose the right ROS 2 communication pattern and inspect how nodes exchange robot data and commands.

Read tutorial

Intermediate · 20 min read

ROS 2 TF2 Coordinate Frames for Mobile Robots

Build and debug a TF2 frame tree from map and odom through the robot base to each sensor.

Read tutorial

Intermediate · 21 min read

SLAM, Mapping, Localization, and Odometry Drift

Connect odometry, range sensing, mapping, localization, scan matching, drift, and loop closure.

Read tutorial

Beginner · 18 min read

Ultrasonic vs Time-of-Flight Robot Sensors

Choose, mount, calibrate, and test ultrasonic or time-of-flight sensors for obstacle detection.

Read tutorial

Prefer to build something?

Browse by the system you want to make.

Every project guide includes theory, a real algorithm, downloadable diagrams, a component checklist, and an interactive simulator.

Explore project library