Learn robotics by building a robot buggy and controlling it with a Raspberry Pi
On this course from the Raspberry Pi Foundation, you’ll build a robot buggy controlled by a Raspberry Pi.
You’ll start by learning how to connect motors to your Raspberry Pi, and how to write a Python program to control them to move your buggy. You’ll move on to adding sensors to your robot and writing algorithms that use the inputs from these sensors, giving your robot the ability to follow lines and avoid obstacles.
You’ll examine the wider context of modern robotics, and think about how robotics affects society.
This course is for people with little or no experience with physical computing, who want to create their first robot.
Ideally you should have some basic familiarity with Python, for example from our Programming 101 course.
It is particularly well-suited for teachers delivering lessons up to GCSE level or equivalent, who are looking for engaging programming activities for their classrooms.
This course requires you to have the following:
- Raspberry Pi 3B, 3B+, or 4
- Motor controller board
- Two 3V–6V DC motors
- Two wheels
- Ball caster (unless using more than two wheels)
- An Ultrasonic Distance Sensor (UDS)
- Two resistors for splitting the voltage if the UDS is 5V (e.g. a 1200 and a 2200 Ohm resistor)
- Two line-following sensors
- Jumper leads (female-to-female and male-to-female) or wire
- AA battery holder (for four AA batteries)
- Four AA batteries
- A USB powerbank (to power the Raspberry Pi)
- Soldering iron and solder
- Wire strippers
- A small cardboard box for the chassis (can be plastic, wood, metal, etc.)
- Black tape and white paper or card (to make a track with a black line for the line-following robot)
The hardware components and tools are listed in this document. This list includes suggested models, types and pictures of each component, although alternatives are also available.
- The latest version of the Raspbian operating system
- An IDE of your choice
- Adhesives (duct tape / electrical tape, putty, glue, etc.)
- Cable ties or velcro straps
- GPIO reference card