Studyfin Studyfin ✨ Sign up free

Robotics & physical computing

Grade 4 · Coding · Free lesson

Hi there! I am Studyfin, your friendly coding helper. Today, we will learn how to design a program to control a real robot!

Robots are physical computers. They use sensors to see the world and motors to move around. We write programs to tell them what to do.

blog

A good program follows a clear plan. We use events like a 'Start' button click. Then, we use sequences to do things in order. We also use loops to repeat actions.

START

Conditionals are 'if-then' rules. If a sensor detects a wall, then the robot must stop. This keeps our robot safe from crashing!

WALL
✏️ Worked example

Let us design a program for a toy robot to clean up a room. The robot must move forward, pick up a toy, and repeat this until the room is clean.

  1. Identify the goal: We want the robot to find and pick up toys safely.
  2. Create the event: Start the program when we press the physical 'Go' button.
  3. Write the sequence: Tell the robot to move forward and open its claw.
  4. Add a conditional: If the sensor sees a toy, then close the claw to grab it.
  5. Add a loop: Repeat these steps until the sensor says there are no more toys left.
playground
Want the full interactive lesson — quiz, animations, and Finn cheering them on?

More Coding lessons