In Add a Light you built a second LED and wrote scripts to control both of them. In Intro to Lists, you got to see how to create and access lists. In this activity, you will add a third LED, and then use lists to set up custom LED on/off sequences. You will even use a list of LED pins and a list of on times in the same for loop to fully customize the light sequence.
(1) Setup from Add a Light
(1) LED - Red
(1) Resistor - 220 Ω (red-red-brown-gold)
(1) Jumper wire (black)
- Disconnect USB.
- Connect a red LED to P15. Build it above the yellow and green LEDs so that it looks like a stop light (red above yellow above green).
- Reconnect USB.