Rotating Robots, Squares, and Mazes – Programming Turns

IMG_20160505

90 degree turns

For the first few weeks of Term 2, the girls explored how to program their robots to turn at a 90 degree angle. As they quickly discovered, this wasn’t as simple as it first appeared! The ability to program precise turns is an essential skill for FIRST LEGO League, where students have to navigate around obstacles on a large game board.

Screen Shot 2016-05-18 at 2.42.06 pm

Robot Squared!

After working out how to program the 90 degree turn, students were challenged to program their robot to move in a square. To complete this challenge, students were introduced to the concept of written algorithms – a sequence of written instructions required to perform a task.

For example, to program their robot to move in a square, students needed to identify and code the component steps:

  1. Start
  2. Move Forward – 4 rotations
  3. Turn 90 degrees right
  4. Move Forward – 4 rotations
  5. Turn 90 degrees right
  6. Move Forward – 4 rotations
  7. Turn 90 degrees right
  8. Move Forward – 4 rotations
  9. Brake.

In the EV3 Mindstorms software, this program looked something like this:

Screen Shot 2016-05-18 at 2.44.03 pm

Introducing Loops 

As many students quickly realised, programming repeating actions can be quite painful – as the added complexity opens up new opportunities for bugs (problems with the code) to arise. There had to be a simpler way!

To quote our newest Year 6 team member, “Where’s the loop block?”

In computer programming, the loop or ‘repeat’ function is used to repeat an action. In the case of the robot square, the complicated algorithm above can be simplified to the following:

Start

REPEAT (Loop) – 4 times

  1. Move Forward – 4 rotations
  2. Turn 90 degrees right

END (Brake)

The resulting Mindstorms program looked something like this:

Screen Shot 2016-05-18 at 2.42.26 pm

Solve The Maze!

The final challenge enabled students to apply their learning about Straight Moves and Turns to navigate their robot through a maze. Who would have thought masking tape would be so useful in a robotics class?

IMG_20160428_112040

Each group could choose their start and end points, and students were encouraged to physically step out the movements through the maze, writing out their algorithms. They then had to code and test their solutions, revising them (debugging) along the way. Almost all of our students managed to complete this challenge successfully!

2016-05-05 12.38.31 (1)

Making Headway

The Turns & Curved Moved Challenges were a turning point for our beginner FLL teams – no pun intended. Over the course of the 2-3 weeks we spent on this topic, the girls began to fly. They have become confident problem solvers, and are learning how to work effectively with different team members across a range of tasks.

As we begin to ramp up our FLL pre-season preparations, I’d like to thank our parents for their amazing support for this program, particularly for the before-school robotics workshops which we began this week. Your daughters are living proof of our motto “We believe you don’t need to be a boy to be good at robotics!”

2 thoughts on “Rotating Robots, Squares, and Mazes – Programming Turns

    • Hi Catherine,

      Thanks for leaving us a comment 🙂 I have been really amazed by what talents and interests this program has revealed amongst my students. It has been a steep learning curve for all of us, but I am really excited by their progress.

      Regards,

      Mr Graffin

Leave a Reply

Your email address will not be published. Required fields are marked *