Week 4 – Rich

There are some students away this week so rather than progress with teaching I’ve set a challenge to try and put together all of the pieces we’ve looked at so far.

The challenge is:

There are four flat Lego tiles placed in a straight line 50cm apart.  One tile is red, one tile is green, one tile is yellow and one tile is blue.  The tiles can be placed in any order.

Write EV3 code from the pseudocode, below:

1. Move forwards in a straight line
2. If a red, green or a yellow tile is detected stop and wait for one second
3. If the tile is red, stay stopped
4. If the tile is yellow, move forwards until it is not yellow and go back to 1
5. If the tile is green, wiggle side to side 3 times and go back to 1

In your own blog posts for week 4, describe what you did today.  Show your EV3 code and discuss any problems you had.