Build and program a robot car to drive as close as possible to a LEGO minfig, without knocking it over.

Sounds easy?

The catch is that you are not allowed to use any sensors and once you are told how far the minifig will be from the starting line, you will only get attempt.

## The challenge

Daredevil Dan is preparing for a stunt that will be held on a 3-metre track. As Daredevil Dan’s stunt coordinator, your challenge is to build and program a robot car to drive as close to as possible to Dan, without knocking Dan over.

This is a dead reckoning challenge. You are not allowed to use any sensors to detect Dan.

You will have a time to practise making your robot drive various distances. At the end of the practise time, you will be told exactly how far from the starting line Dan will be. You will then have time to program your car, but you may not test it.

Once all the cars are programmed, they will take turns driving from the starting line. The car that finished closest, without knocking over Dan, is the winner.

## Teacher notes

I usually describe this challenge as above and then give a deadline, “In 20 minutes I’m going to give you the distance that Daredevil Dan will be standing from the starting line. Until then you can do as much experimenting as you like. I’d suggest recording the results of what you try, because once I give you the distance, there will be no more experimenting. You will then have a few minutes to make any adjustments you like to your program, but you will only get one attempt at the given distance.”

When I first started using this challenge, I would’t give my students too much more advice than that but in recent years, I’ve explicitly instructed them to record their results in a table of values. This seemed to make a big difference, both in terms of their confidence and their success. And, of course, this challenge provides a great opportunity to assess students’ understanding of linear relationships.

Here is a sample of the data collected from two different teams (click on each image for a larger version) in one of my senior secondary school classes.

In one of my recent classes, some teams quickly came up with a rule (i.e. a mathematical formula) for converting a given distance into a number of degrees (or a time) to run the motors. I asked someone from each of these teams to come up to the front of the room and together we looked at how you could use the Math block in the EV3 Software to perform these calculations.

For example, using the formula that Team 2 determined in the data above, the program could automatically calculate the rotations required to drive, say, 1500mm (1.5m).

We then looked at how this could be converted to a MyBlock (see the image below). Note the use of the Constant block to create a parameter for the distance input. This isn’t strictly necessary, but I still like to do it this way to emphasise the values that we want a new MyBlock to take as inputs (and/or return as outputs).

And finally, if you’re feeling brave (or reckless!), instead of using a minifig or another object as the target, you could have the robots start a set distance from the edge of a bench/table with the aim of end closest to the edge of the table without falling off. Good luck with that. 😄

## Resources

- Download: Going the Distance 2019 (PDF)

#### CEEO

#### Latest posts by CEEO (see all)

- Chair for Mr Bear - 21 August 2020
- Assistive Technology: Making Lives Easier - 20 August 2020
- Sturdy Tower - 14 June 2020