Traffic Light

You will need: Cardboard, Coloured paper, Glue, 2 SAM DC Motors, 1 SAM Light, 1 SAM Slider, 1 SAM Button.

  1. Cut a traffic light shape out of cardboard. Leave a small slot at the bottom for the base support.

  2. Decorate the light structure with coloured paper.

  3. Cut the other half of the base in a triangular shape, cutting a small slot on the top to fit it into the other piece.

  4. Attach the SAM Light to the top of the traffic light.

  5. Now you'll need a car! Cut the body from cardboard.

  6. Cut 3 wheels out of cardboard, as well.

  7. Create some support pieces for the DC Motor block and attach the pieces to the rear of the car.

  8. Decorate the car however you like! Tip* a good racer has good racing stripes.

  9. Attach the DC Motors onto the back of the support pieces.

  10. Put wheels on the Motors.

  11. Now open SAM Space, turn the SAM DC Motors, the Light, the Button and the Slider on, and drag them onto the canvas. Connect the Slider to the 2 DC Motors by drawing a line between them. This will be the power of the car.

  12. For the traffic light, connect the Button to a "Counter" Soft SAM to control how many times the Button is been pressed. Then, connect the "Counter" to 3 "Compare" blocks and each Compare block to a "Colour" block in order to choose the colour of the Light depending on the input number. Those 3 "Colour" blocks need to be connected to the Light. Finally to reset the whole system, connect a "Compare" and a "Text" block, with word 'RESET' in it, to the counter.

  13. Drive on!