Robotics

Think like a robot.

Robots use sensors to notice what’s around them and rules to decide what to do next. Give a rover its rules and watch it think.

Try the challenge
A small wheeled robot with an ultrasonic sensor and exposed wires.

Help a rover avoid a wall

  • TimeAbout 10 minutes
  • You needJust this page.
  • GoalChoose two rules that get the rover to the flag without getting stuck.

Start here: Course 1 has one rock in the way.

  • Rover (orange dot = sensor)
  • Square the sensor checks
  • Rock (a wall)
  • Flag

1. Choose the rover’s rules
2. Test them
What the rover did

    How it works: sensors and rules

    A sensor gives a robot information. The rover’s forward sensor checks the square in front of it. It can only tell “wall” or “no wall”. It doesn’t know where the flag is!

    A rule tells the robot what to do next. At every step, the rover checks its sensor, picks the rule that matches, and does what that rule says.

    Example: Some robot vacuum cleaners work like this. When a bump sensor touches a chair leg, a rule tells the robot to turn away.

    In the coding challenge you planned every move yourself. Here, the rover chooses each move using your rules.

    Make your own: a delivery rover

    Draw a rover that delivers parcels. Label what it senses and how it responds.

    1. Draw your rover

      Wheels, a body and somewhere to carry the parcel.
    2. Add sensors

      Label each one: a bump sensor, a light sensor, a camera…
    3. Write the rules

      For each sensor: “If it senses …, then it …”
    4. Act it out

      Be the rover! A friend reads the rules while you follow them.

    Harder version

    Give your rover three rules. Draw a course where they work, and one where they don’t. What rule would fix it?

    Share your delivery rover drawing with its sensors and rules labelled.

    Loading projects…