Robot Dance

Please find a printable version of this page HERE.

Task Description

The goal for this introductory programming challenge is to get the robot to dance. By making their robot dance, students will learn some basic programming skills such as moving forwards and backwards, turning, and using loops.

Materials Needed

  • EV 3 Mindstorm Robot in base configuration
  • Lego Mindstorms Education EV3 Classroom™ software on an iPad or PC
  • Music

Dancing Robots

Watch a video of a group of dancing robots here (click on the image to access video):

Programming to Dance

Please find a step-by-step tutorial on programming the robot to dance below, or see these video tutorials. Note: An older version of the EV3 programming software is used for the video tutorials.

1) Moving Forward and Turning

Drag a <Move> Block from the pink Movement category to the programming canvas and connect it to the <Start> Block. Add a <Stop> Block from the orange Control section to your programming stack to exit out of the program.

The <Move> Blocks have different functions. In the <Move> Block below, Steering and Duration can be set:

Note: There are other <Move> Blocks with different controls. For example:

2) Loops

Loops are useful for repeating a sequence of steps, such as dance moves. To create a loop, go to the orange Control tab on the left menu bar. Then drag the <Loop> Block onto the programming canvas.
Note: <Loop> Blocks are C-shaped.

Then, drag your sequence of blocks into the loop. make sure they are attached to the stack and in the correct order. The <Stop> Block at the end of the program should be outside the loop.

There are many options for how long the loop repeats.
You can enter a number at the top of the <Loop> Block.

Note: Forever <Loop> and Repeat Until <Loop>

If you want to repeat indefinitely, use the Forever <Loop> from the menu tab on the left.

Another option is the Repeat Until <Loop>, where you can add a Sensor input or other conditions in the field at the top.

A printable PDF of this challenge can be found HERE.


© 2022 Dr. Krista Francis & Stefan Rothschuh