Two LEDs

Now, we will control two LEDs at the same time.

Make the connections to pins 12 and 11 as shown.

Now upload two program two-leds. Watch the LEDs, read the program and figure out what it does.

Try making the following modifications (save as two-leds-mod in your Mod folder first!).

  1. Change the pins from 12 and 11 to 10 and 9.
  2. Change the order so LEDa turns on, LEDb turns on, then LEDa turns off, and finally LEDb turns off.
  3. Change the time for which the second LED stays on.

CHECKPOINT!