Skip to main content
โ† Back to Robotics & Embodied AI
Elementary Lab

Robot Commander

Program a robot with a sequence of commands, then run it and watch your code move in the world.

Robot Commander

You are the programmer! Stack command blocks to guide your robot ๐Ÿค– to pick up the star โญ and bring it to the home ๐Ÿ . Robots follow programs exactly โ€” get the order right!

Robot World

๐Ÿ โญ๐Ÿค–12345671234567
Facing: โ†’ East|Star: On grid

Commands โ€” tap to add

Your Program (0 steps)

Add commands above to build your program.

How does it actually work?

Real robots โ€” like the ones that explore Mars or clean your floors โ€” run programs: ordered lists of instructions. The robot reads each instruction one at a time and executes it exactly. It does not skip steps, think ahead, or "know" what you meant โ€” it only does what the instructions say.

This is called sequential execution. The order of commands matters enormously: "Turn Left then Move Forward" takes you somewhere completely different from "Move Forward then Turn Left." Debugging a robot program means reading each step and checking whether the robot's state (position + direction) is what you expected.

The Sense command simulates a distance sensor โ€” real robots use sonar, infrared, or LIDAR to detect obstacles without touching them.