Traffic+lights

=Introduction=

We find [|traffic lights] throughout the world. They control the flow of traffic allowing for vehicles to 'take turns' at an intersection or junction.

=Task=

Your task is to use Scratch to program the sequence of a set of traffic lights.

Your first task is to produce a set of instructions for a pedestrian crossing. You will need to say what will happen to each set of lights (one faces in each direction) after you press the button.

Your list should start...


 * 1) Press the button
 * 2) Wait for 10 seconds
 * 3) //fill in the rest//

Check with your teacher when you have completed this list.

Remember each set of lights in a set of lights follows this sequence.



=Time to start programming=


 * 1) Open Scratch
 * 2) Draw a sprite of a rectangle with 3 circles on it containing each of the different colours
 * 3) Create a costume for each light combination by blacking out the ones you don't need.
 * 4) Begin your programming by creating a script which will change your lights to green when the green flag is pressed.This should look like this.



Next you must begin to change the costumes according to the order of your traffic lights. It will begin like this.



=Additional tasks=

Impress your teacher with the following...


 * Two sets of lights - like a pedestrian crossing.
 * Three sets of lights allowing a one way street to cross a two way street.
 * Four sets of lights for a four way intersection.

To really impress your teacher... add some moving traffic so that it moves at the correct time.