Skip to content

Mindstorms Exercises

Key Concepts

  • Instruction Sequence
  • Loops
  • Conditionals
  • Predicates
  • Input/Output (sensors, buttons, LEDs, display, motors)
  • Motor Control

Follow Along and Copy Exercises

Crazy Eyes

  1. Display Crazy 1 and Crazy 2 eyes images (or any two opposing images).

  2. Add pauses after each image block to prevent the images from flashing on the display.

  3. Create a sequence of alternating eyes. After 4 or 5 images, the student should realize the need for a loop.

  4. Add an infinite loop to create animation.

  5. Play with different pause lengths: 3, 1, .5, .25, .10.

  6. Adjust the loop to terminate after 5 iterations.

  7. Adjust the loop to terminate after 10 seconds. Notice that the timing might not be exact if lang pause blocks are included.

  8. Adjust the loop to terminate when the center button is pressed. Notice a button press will not be recognized during execution of the blocks in the loop. Long pause values will possibly require longer button presses.

  9. Adjust the loop to terminate when a touch sensor is pressed.

Touchy Dog

  1. Make the EV3 bark until the center button is pressed.

  2. Make the EV3 bark when the center button is pressed.

  3. Make the LED turn green if pressed and red if not.

  4. Play a meow when the up button is pressed.

  5. Play a elephant sound when the down button is pressed.

  6. Make it bark twice when a touch sensor is pressed.

Square Dance

  1. Go forward 1 foot, stop, turn 90 degrees and continue the outline of a square.

  2. Convert this to using a loop and get rid of 3/4 of the blocks used in step 1.

  3. Copy and paste the loop and make the EV3 do a square forward and then in reverse.

Non-linear Car Path

  1. Make the EV3 travel on a sinusoidal path to a target (smooth turning only, no sharp angles).

  2. Make the EV3 travel on a saw-tooth path to a target (use only 45 degree turns).

  3. Make the EV3 travel on a rectilinear path to a target (use only 90 degree turns).

Challenges

Forward and Back

  1. Go forward 2 feet and then go back 2 feet using time.

  2. Do the same thing, but use motor rotations.

  3. Go forward until hitting a wall and then go into reverse for 2 feet.

  4. Go forward 2 fee using rotationst, stop, turn 180 degrees and then drive back to starting position.

  5. Go forward until a color sensor sees a black line and then turn around and come back to starting position.

Line following

  1. One sensor

  2. Two sensor