Grades 6-12+

The Python with Robots Digital Textbook

9 missions of scaffolded, standards-aligned Python curriculum - paired with the CodeBot robotic rover. Students learn Python fundamentals by lighting up LEDs, powering motors, and navigating with sensors and control loops.

Get the CodeBot Lab Kit

Putting the CS in Robotics - From LEDs to Autonomous Navigation

Python with Robots teaches Python fundamentals through a series of structured robotics projects with the CodeBot rover. From lighting up LEDs, to powering motors, to navigation using sensors and control loops, students are drawn into the world of coding as they learn fundamental concepts of embedded computing and robotics - one project at a time.

Across 9 missions, students progress from blinking their first LED to building an autonomous patrol bot with proximity sensors, line following, and dead-reckoning navigation. Every concept is grounded in a physical challenge - the robot's behavior is the feedback loop. The hardware is honest - it works, or it tells you exactly what to fix. That cycle of struggle and breakthrough builds the systematic thinking and confidence that makes every future tool more powerful, including AI. This isn't abstract coding exercises - it's a carefully authored digital textbook where students see their code come to life.

91 objectives. 10 quizzes. Hundreds of guided coding steps. Each mission includes interactive CodeTrek walkthroughs, built-in hints, and automatic goal validation. Standards-aligned for middle school through high school CS, robotics, and CTE courses.

Mission-by-Mission Breakdown

Each mission is a hands-on robotics project that teaches new Python concepts through the CodeBot rover. Click any mission to see its objectives.

Mission 1: Welcome 4 objectives, 1 quiz
Mission 1: Welcome

Take a tour of the CodeSpace development environment. Students learn how the text editor, Toolbox reference, and simulation controls work before writing any code.

Key concepts: CodeSpace IDE, text editor, Toolbox, simulation

Objectives

  1. Mission Objectives
  2. Text Editor
  3. Tool Box
  4. Simulation Controls
Mission 2: Introducing CodeBot 10 objectives, 1 quiz
Mission 2: Introducing CodeBot

Get to know your friendly neighborhood CodeBot! Students explore the rover's motors, LEDs, speaker, wheel encoders, and pushbuttons. Then they connect it to CodeSpace and light it up with their first Python program.

Key concepts: Motors, LEDs, speaker, encoders, USB connection, CodeTrek

Objectives

  1. Motors
  2. LED Lights
  3. Speaker
  4. Wheel Encoders
  5. Pushbuttons
  6. Connect the USB
  7. Link to CodeSpace
  8. Save the Code!
  9. The CodeTrek
  10. Lights On!
Mission 3: Time and Motion 11 objectives, 1 quiz
Mission 3: Time and Motion

Power up the CodeBot's motors and LEDs to create your first robotics project! Students learn about the debugger, variables, and sequential execution while building LED sequences and their first navigation challenge.

Key concepts: Debugger, variables, sleep(), motors, LED sequences, button input

Objectives

  1. LED Sequencer
  2. The Debugger
  3. Slow it Down
  4. Variable Speed!
  5. Light Show!
  6. Bright Byte Lights!
  7. Get Moving
  8. Rotation Time!
  9. First Navigation Challenge!
  10. Choose Your Adventure!
  11. Button it Up!
Mission 4: Animatronics 12 objectives, 1 quiz
Mission 4: Animatronics

Create an "Animatronic Robot Exhibition" by combining lights, sounds, and movement. Students learn counting loops, sound output, and how to orchestrate multiple robot behaviors into a cohesive performance.

Key concepts: Counting loops, sound output, coordinating behaviors, code organization

Objectives

  1. Forever Flashing
  2. A Cool Pattern
  3. Fixing A Cool Pattern
  4. Counting the Guests - part 1
  5. Counting the Guests - part 2
  6. Beep Beep, I'm a Bot!
  7. Beep Beep 2
  8. Moving Forward
  9. Cute Robot Sounds
  10. Really Cute Sounds
  11. FanFare!
  12. Putting It All Together
Mission 5: Fence Patrol 9 objectives, 1 quiz
Mission 5: Fence Patrol

Drive between the lines! Students gain an in-depth understanding of CodeBot's line sensors through the debug console, custom functions, and defensive driving algorithms that keep the robot in bounds.

Key concepts: Line sensors, debug console, functions, sensor-driven navigation

Objectives

  1. Line Sensors Up-Close!
  2. The Debug Console
  3. Crossing the Line
  4. (Fun)ctions
  5. Line Sensor Magic Lights!
  6. Defensive Driving
  7. Driving in Bounds
  8. Flicker Begone!
  9. Fence Patrol v1.0
Mission 6: Line Follower 8 objectives, 2 quizzes
Mission 6: Line Follower

Tune up the line sensors and hit the road! Students tackle the classic line-following challenge using the REPL, edge detection, and proportional control - building increasingly sophisticated algorithms to master the course.

Key concepts: REPL, edge detection, proportional control, sensor calibration, reliability

Objectives

  1. Speedy Sensing!
  2. Using the REPL
  3. Magic Lights Redux
  4. Down to the Metal!
  5. Between the Edges
  6. Increased Reliability and Speed
  7. Proportional Control
  8. Read the Line
Mission 7: Hot Pursuit 11 objectives, 1 quiz
Mission 7: Hot Pursuit

Go in-depth with the proximity sensors! Students write code to detect, pursue, and avoid objects - building presence detectors, auto-calibration routines, and a smart pursuit algorithm.

Key concepts: Proximity sensors, auto-calibration, object tracking, pursuit algorithms

Objectives

  1. Presence Detector
  2. Power and Sensitivity
  3. Range Scanning
  4. Auto Calibration - part 1
  5. Auto Calibration - part 2
  6. House Cleaning
  7. POWER
  8. Face Off!
  9. Face Off Harder!
  10. Chase Mode
  11. Smarter Pursuit
Mission 8: Navigation 14 objectives, 1 quiz
Mission 8: Navigation

Learn to navigate by moving a specific direction, distance, and speed from a known location using the CodeBot's wheel encoders. Students build speedometers, cruise control, and dead-reckoning navigation.

Key concepts: Wheel encoders, distance measurement, speed control, dead reckoning, breakpoints

Objectives

  1. The Wheel Encoders
  2. Check Your Pulse!
  3. Sensing Both Wheels
  4. Measuring Distance
  5. Driving Forward
  6. Repeat the Journey
  7. Repeat the Journey 2
  8. Speed-o-Meter
  9. Speed-o-Meter 2
  10. Cruise Control
  11. Slow Starts, Breaks, and Brakes!
  12. Breakpoints
  13. Dead Reckoning!
  14. Dead Reckoning 2
Mission 9: All Systems Go! 12 objectives, 1 quiz
Mission 9: All Systems Go!

Explore CodeBot's internal sensor systems by creating a battery tester, temperature measurement tool, and alarm bot! Students combine accelerometer data, temperature sensing, and everything they've learned into a final guard bot project.

Key concepts: Battery monitoring, temperature sensor, accelerometer, data smoothing, system integration

Objectives

  1. Battery Check
  2. Battery Tester
  3. Equations To The Rescue!
  4. Battery Indicator Light
  5. Sensing Temperature
  6. Smoothing The Data
  7. Temperature-Controlled Lights!
  8. Accelerometer
  9. Reach for the Stars
  10. Upgrade!
  11. Guard Bot
  12. Guard Bot 2: Guard Harder

Resources & Links

Ready to bring robotics to your classroom?

Get the CodeBot Lab Kit