Bundle and save to celebrate summer! Shop Now

View All Materials


Traffic Bot



Experience Level

Grades 1-3

Grades 3-5


30-60 minutes

Group Size

Small Groups (2-4)

Compatible Robots

Root SimBot

Root rt0 Coding Robot

Root rt1 Coding Robot


Traffic signals are a staple of safety in our everyday lives. Complete the coding challenges and discover who invented the traffic signal!

Downloads & Resources

Traffic Bot Activity Guide Finish the Story: Big City Adventure Starter Code: Big City Adventure Traffic Bot CodeBreak (with robot) Traffic Bot CodeBreak (with simbot) Traffic Bot CodeBreak (unplugged) Generations of STEM Activity Answer Key: Traffic Bot CodeBreak (with robot) Answer Key: Traffic Bot CodeBreak (with simbot) Answer Key: Traffic Bot CodeBreak (unplugged) Answer Key: Generations of STEM Activity Simulator Overview

Traffic Bot

Learning Objectives

Students will be able to:

Build a program that makes the Root robot glow red, yellow, and green like a traffic light

Identify details about Garrett Morgan, the inventor of the traffic light

Make connections between the purpose of the traffic light and how it impacts daily life

Reflect on other ways coding and robotics can impact classrooms and communities

Getting Started

Share the Big City Adventure video with students. How can Root help fix the broken traffic signal? Discuss with students how to code Root as a traffic light. What colors will it need to glow?

Open the Starter Code: Big City Adventure to code Root into a Traffic Bot. Visit code.irobot.com and let students build their own program.

Let students share their coding solutions with the class to explain their thinking and expand about the decisions they made.


1. Traffic Bot CodeBreak Packet: Complete the coding challenges to discover who invented the traffic signal! Students can work independently or in small groups to complete the Traffic Bot CodeBreak packet.

2. Generations of STEM Activity: Learn more about Garrett Morgan, the inventor of the present-day traffic signal! This activity guide gives more information about Morgan’s accomplishments and celebrates his contributions. Depending on the needs of your students, you can read the biography together as a class, in small groups, or as an independent activity.


Wrap up the lesson with a discussion about inventions, problem solving, and identifying solutions. Some potential questions include:

1. Why were Garrett Morgan’s inventions so important?

2. What qualities does Garrett Morgan embody that support his success?

3. Think about the Root robot as a traffic signal. What are other ways robotics and code can help our classroom or our community?


Congratulations on completing your coding activity! Your next steps are:

1. Share on social media that your class has completed an Hour of Code™ using the tags #HourOfCode and #iRobotEducation

2. Visit code.org/api/hour/finish to download your Hour of Code™ Completion Certificate!

Educational Standards

CSTA K-12 CS Standards


Model daily processes by creating and following algorithms (sets of step-by-step instructions) to complete tasks.


Model the way programs store and manipulate data by using numbers or other symbols to represent information.


Develop programs with sequences and simple loops, to express ideas or address a problem.


Decompose (break down) the steps needed to solve a problem into a precise sequence of instructions.


Debug (identify and fix) errors in an algorithm or program that includes sequences and simple loops.


Create programs that use variables to store and modify data.


Create programs that include sequences, events, loops, and conditionals.


Decompose (break down) problems into smaller, manageable subproblems to facilitate the program development process.


Test and debug (identify and fix errors) a program or algorithm to ensure it runs as intended.