Future-Ready · Robotics

Programming a Robot

A robot does EXACTLY what its program says — built from a sequence of steps, loops that repeat, and IF/THEN decisions.
🧩Build a Program: Steps, Then a Loop
📋 The Program 1 · Move forward ▲ 2 · Turn right ↻ 🔁 REPEAT × 4 { Move forward ▲ } do it again, 4× Run top → bottom, in order. RUN start 🎯 🤖 The robot follows the path
The robot reads the blocks one after another. The loop lets 1 block do the work of 4 — and it lands on the 🎯 goal.
📋 Sequence
Steps in order, top to bottom. Swap two steps and the robot ends up somewhere totally different!
🔁 Loop
A repeat block. Instead of writing "move" 4 times, you write it once and say ×4.
🔀 IF / THEN
A choice. The robot checks a sensor and picks a path — only doing the step if something is true.
🔀Making a Decision: IF / THEN / ELSE
🚗 Driving… IF bump sensor pressed? YES THEN turn right ↻ NO ELSE keep going ▲ 🔁 check again… 🧱 a wall!
IF = the question (a true-or-false test of a sensor).
THEN = what to do when the answer is YES (true).
ELSE = the backup plan when the answer is NO (false).
It checks again and again, so the robot reacts the instant it bumps something.
🏠In Real Life: a Robot Vacuum
🛋️ couch 💥 🤖 vacuum IF bumped → turn ELSE → keep cleaning
🏠 Same three ideas, real machine
📋Sequence: drive straight, vacuuming as it goes.
🔁Loop: repeat "clean a strip" until the whole floor is done.
🔀IF/THEN: if the bump sensor hits the couch, then turn — else keep going.
🔑Key Terms
🗺️Algorithm A clear, step-by-step plan that solves a problem — like a recipe the robot can follow.
📋Sequence Steps carried out in a set order, one after another, from first to last.
🔁Loop A block that repeats steps — a fixed number of times, or until something becomes true.
🔀Conditional (IF/THEN) A decision: the robot does one thing IF a test is true, and something else (ELSE) if it's false.
💾Program The full set of instructions — sequences, loops, and conditionals — that tells the robot what to do.
🐞Debugging Finding and fixing the mistakes ("bugs") in a program so the robot behaves the way you want.
Remember: a robot has no common sense — it follows your program EXACTLY. Order your steps carefully, loop to save work, and use IF/THEN so it can react to the world!
✏️ Future-Ready Anchor Chart · Programming a Robot: Sequences, Loops & IF/THEN
From ClickClass — hundreds of free printables at clickclassedu.com/printables