Use your RaspberryPi 3 with the excellent electronics kit from Amazon
The first circuit to complete is this traffic light:
Use with the following Python3 code. Don’t forget you will need to be running with sudo access to use the GPIO pins:
For a challenge, you can refine using a procedure that can be called from within a loop, as well as adding a pedestrian crossing red and green indicator.