Skip Navigation

Self-Driving Cars

By Steve Blair and Kassandra Lenters
Developed in partnership with:
120 minutes
Key Coding Concepts
  • Algorithms
  • Conditional Statements
  • Debugging
  • Events
  • Loops
  • Sequences


a radio device for detecting the position of things in the distance and the direction of moving objects



Similar to radar but uses lasers instead of radio waves.

Level Grades 4-6
Subjects Science and Technology, Social Sciences, Other
Provinces / Territories Across Canada


Learn about the future of transportation and build a game in Scratch that simulates how self-driving cars work.

Watch the “Content 101: Scratch” video: http://bit.ly/content101-videos

Review the completed version of the project: http://bit.ly/self-driving-example

Print the Solution Sheet for the main activity: bit.ly/self-driving-solution

This lesson requires computers and access to the internet - or the offline Scratch editor and starter projects downloaded onto computers ahead of time.



Ask: How do cars work? (Who is able to drive cars? What do they need to know before they can start driving? etc..)

Ask: What if a car could drive by itself? Companies like General Motors have actually created something called “self-driving cars” and are testing and training them today. Have you heard of this?

We are learning about self-driving cars, and creating a game in Scratch to help us understand how they work.

Complete a KWL chart using anchor chart paper and markers.

  • Ask: What do we think we know about self-driving cars? (Record answers under “K” for Know)
  • Ask: What do we want to know about self-driving cars? (Record answers under “W” for Want to Know)
  • Say: We are going to learn how self-driving cars work by watching a video and building a game in Scratch! Then we will come back to our chart and answer the “L” (Learned) section.

Part 1: Video

Watch this video about how self-driving cars work:

Discover more at the General Motors website: https://www.gm.com/mol/selfdriving.html

Part 2: Scratch

Code Along

Open up a new Scratch project at scratch.mit.edu and click on “create” (top, left corner).

  • Point out the main elements: Stage, Sprites, and Scripts. Demonstrate how to drag and connect blocks.
  • Give learners a few minutes to click on blocks and explore.
  • Go through 1-2 challenges with the group, where learners are tasked with trying to make something happen in Scratch. For example, “Try to make Scratch move” or “Try to make Scratch say something when the space key is pressed” (See the Code-Along Challenges doc (http://bit.ly/scratch-challenge-solutions-doc) for more examples and solutions)


We are building a game in Scratch to show how self-driving cars work.

Show the example project so learners know what they are working towards. Ask them what they see/hear - what is happening in this project?

Open the starter project (http://bit.ly/self-driving-starter) and review the Sprites and backgrounds. Have learners open the starter project on their screens and click "REMIX."

Use the Solution Sheet to guide learners through the following steps:

  • Make the car move
  • Add a radar
  • Use radar to sense the road
  • Choose a starting point
  • Test and debug
  • … and any additional Add-Ons, if time


Close or put away computers and return to the KWL chart. Complete the “L” (Learned) section. Ask: What did we learn from the video we watched about how self-driving cars work? What did we learn from building our game in Scratch?

If there are still unanswered questions from the “W” (Want to know) section of your chart, you should be able to find most of the information from General Motors’ 2018 Self-Driving Safety Report.

Learning Outcomes (Scratch)

I can give the computer instructions to tell it what to do
I can use conditional statements to control what happens in my project
I can use loops to make things happen more than once
I can use events to control when things happen
I can keep testing and debugging to make my project better

Use the following ScratchEd rubric to assess the learner’s ability to communicate their design process (see “Experimenting and Iterating” and “Testing and Debugging”): http://scratched.gse.harvard.edu/ct/files/Student_Assessment_Rubric.pdf

  • Have learners write about what a future with self-driving cars could look like (e.g. How would it affect the environment?). Refer to General Motor’s “imagine” statements in their 2018 Self-Driving Safety Report (above).
  • Brainstorm possible scenarios that a self-driving car may face, then have learners add the scenarios and solutions to their project in Scratch (e.g. an animal crossing the road).
  • Machine learning is an important part of training self-driving cars to know what to do in different scenarios. Spend time learning more about Machine Learning through Google’s Teachable Machine (https://teachablemachine.withgoogle.com/)
  • Have learners build a self-driving car prototype (using lego, play-doh, pipe cleaners, etc.). Have them label the sensors or any other important features, and share a Design Statement - including which design decisions they made, and why.

Forces causing movement, Energy, Machines, Conservation of energy and resources, Sustainability and stewardship, Electricity and electrical devices, Interactions in the environment, People and environments, Pollution, Safety, Canadian issues and governance

General Motors

“Autonomous car / self-driving car - How it works! (Animation)” video By Thomas Schwenke from Youtube

ScratchEd Rubric

More Lesson Plans

View All Lesson Plans