Challenge Review
Overview
Complete the following six challenges.
Program an LED to flash with a rate of 1.5 seconds on and .5 seconds off.
TEACHER CHECK _____
Program an LED to flash with a rate of .5 seconds on and 1.5 seconds off.
TEACHER CHECK _____
Program three LEDs to turn on in sequence with a delay of half a second between each one.
TEACHER CHECK _____
Program three LEDs to flash alternately with two LEDs on and one LED off and then two LEDs off and one LED on.
TEACHER CHECK _____
Connect three LEDs to any three pins on your microcontroller, except pin 5. Attach a long jump wire to pin 5. Write a program to turn on all three LEDs when pin 5 is connected to ground and turn off all three LEDs when pin 5 is connected to power.
TEACHER CHECK _____
Using a for loop, write a program to blink an LED at a variable rate. The rate should begin by turning the LED on and off for 1ms i.e. 1ms on and 1ms off. The rate should increase to 50ms, or 50ms on and 50ms off. The rate should increment by 1ms.
Using a for loop, write a program to turn on three different LEDs in sequence. No more than one LED should be on at a time. Hint: You will need to use the variable in your for loop to control which LED is turned on. For example, if the variable in your for loop is x than you can digitalWrite(x, HIGH);
TEACHER CHECK _____
Do something interesting!
TEACHER CHECK _____