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 KitPutting 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
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
- Mission Objectives
- Text Editor
- Tool Box
- Simulation Controls
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
- Motors
- LED Lights
- Speaker
- Wheel Encoders
- Pushbuttons
- Connect the USB
- Link to CodeSpace
- Save the Code!
- The CodeTrek
- Lights On!
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
- LED Sequencer
- The Debugger
- Slow it Down
- Variable Speed!
- Light Show!
- Bright Byte Lights!
- Get Moving
- Rotation Time!
- First Navigation Challenge!
- Choose Your Adventure!
- Button it Up!
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
- Forever Flashing
- A Cool Pattern
- Fixing A Cool Pattern
- Counting the Guests - part 1
- Counting the Guests - part 2
- Beep Beep, I'm a Bot!
- Beep Beep 2
- Moving Forward
- Cute Robot Sounds
- Really Cute Sounds
- FanFare!
- Putting It All Together
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
- Line Sensors Up-Close!
- The Debug Console
- Crossing the Line
- (Fun)ctions
- Line Sensor Magic Lights!
- Defensive Driving
- Driving in Bounds
- Flicker Begone!
- Fence Patrol v1.0
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
- Speedy Sensing!
- Using the REPL
- Magic Lights Redux
- Down to the Metal!
- Between the Edges
- Increased Reliability and Speed
- Proportional Control
- Read the Line
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
- Presence Detector
- Power and Sensitivity
- Range Scanning
- Auto Calibration - part 1
- Auto Calibration - part 2
- House Cleaning
- POWER
- Face Off!
- Face Off Harder!
- Chase Mode
- Smarter Pursuit
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
- The Wheel Encoders
- Check Your Pulse!
- Sensing Both Wheels
- Measuring Distance
- Driving Forward
- Repeat the Journey
- Repeat the Journey 2
- Speed-o-Meter
- Speed-o-Meter 2
- Cruise Control
- Slow Starts, Breaks, and Brakes!
- Breakpoints
- Dead Reckoning!
- Dead Reckoning 2
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
- Battery Check
- Battery Tester
- Equations To The Rescue!
- Battery Indicator Light
- Sensing Temperature
- Smoothing The Data
- Temperature-Controlled Lights!
- Accelerometer
- Reach for the Stars
- Upgrade!
- Guard Bot
- Guard Bot 2: Guard Harder