• raspberry pi
  • National Centre for Computing Education logo

Robotics With Raspberry Pi: Build and Program Your First Robot Buggy

Build and program your first robot buggy using a Raspberry Pi, learning how to connect motors, add sensors and write algorithms.

Robotics With Raspberry Pi: Build and Program Your First Robot Buggy
  • Duration3 weeks
  • Weekly study2 hours
  • LearnFree
  • Extra BenefitsFrom $39Find out more

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.

Download video: standard

Skip to 0 minutes and 3 secondsHow can you build your own robot using a Raspberry Pi computer? How can you program the motors of a buggy in Python? How can you design an algorithm so your robots avoid obstacles and follows lines? This free course will teach you how to make your own robot buggy. You will learn about physical computing and programming input and output components, such as motors and sensors. And you will consider the effects of robots on society. You'll also take part in practical activities to design and customise your buggy. This three week course contains peer led discussions, trainer interaction, and feedback on your knowledge as you progress. You can learn whenever and wherever you want.

Skip to 0 minutes and 43 secondsSo whether you're a teacher with students of your own or simply curious about physical computing with a Raspberry Pi, this course will help you build and program your first robot buggy. Sign up now at rpf.io/robotics.

What topics will you cover?

  • The GPIO Zero Python library, and how this can be used to interact with input and output components

  • The construction of a simple robot buggy

  • How distance sensors work

  • Obstacle avoidance algorithms

  • Line sensors

  • Line following algorithms

  • The effect of robotics on society

When would you like to start?

Most FutureLearn courses run multiple times. Every run of a course has a set start date but you can join it and work through it after it starts. Find out more

What will you achieve?

By the end of the course, you'll be able to...

  • Describe the advantages of using robotics to teach computer science
  • Produce a robot buggy that can move in particular patterns, avoid obstacles, and follow a line
  • Develop suitable algorithms for your robot depending on the task
  • Demonstrate how to control a variety of components using the GPIO Zero Python library
  • Discuss different uses of robotics and the components that they may use

Who is the course for?

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 at GCSE level or equivalent, who are looking for engaging programming activities for their classrooms.

What software or tools do you need?

This course requires you to have the following:

Hardware

  • Raspberry Pi 3B, 3B+, or 4
  • Motor controller board
  • 2 x 3V - 6V DC motors
  • 2 x wheels
  • Ball caster (unless using more than 2 wheels)
  • Ultrasonic distance sensor (between 1 and 2)
  • 2 x line following sensors
  • Jumper leads (female-to-female and male-to-female) or wire
  • AA battery holder (for 4 AA batteries)
  • 4 x AA batteries
  • A USB battery pack (to power the Raspberry Pi)
  • Soldering iron and solder
  • Wire strippers
  • Scissors
  • Screwdriver
  • A small cardboard box for the chassis (can be plastic, wood, metal, etc.)

You can view most of the required components on this AliExpress wish list, but they can be ordered / bought anywhere, and alternatives are also available.

Software

  • The latest version of the Raspbian operating system
  • An IDE of your choice

Additional extras

  • Adhesives (duct tape / electrical tape, putty, glue, etc.)
  • Cable ties or velcro straps
  • GPIO reference card

Who will you learn with?

Alex Parry

Alex Parry

Alex is a Learning Manager at the Raspberry Pi Foundation and Computer Science teacher. When not coding, he enjoys table tennis, gaming and going for walks in the woods.

Nina Szymor

Nina Szymor

Nina manages Raspberry Pi's translation community to make our learning resources accessible to anyone, regardless of the language they speak.

Who developed the course?

Raspberry Pi Foundation

The Raspberry Pi Foundation works to put the power of digital making into the hands of people all over the world, so they are capable of understanding and shaping our increasingly digital world.

National Centre for Computing Education

National Centre for Computing Education courses

Supporters

supported by

Join this course

Start this course for free, upgrade for extra benefits, or buy Unlimited to access this course and hundreds of other short courses for a year.

Free
$0

Join free and you will get:

  • Access to this course for 5 weeks

Upgrade
$39

Upgrade this course and you will get:

  • Access to this course for as long as it’s on FutureLearn
  • A print and digital Certificate of Achievement once you’re eligible
New

Unlimited (New!)
$249.99 for one year

Buy Unlimited and you will get:

  • Access to this course, and hundreds of other FutureLearn short courses and tests for a year
  • A printable digital Certificate of Achievement on all short courses once you’re eligible
  • The freedom to keep access to any course you've achieved a digital Certificate of Achievement on, for as long as the course exists on FutureLearn
  • The flexibility to complete your choice of short courses in your own time within the year
Find out more about upgrades or Unlimited.