Challenge Review

Overview

Complete the following six challenges.

  1. Program an LED to flash with a rate of 1.5 seconds on and .5 seconds off.

    TEACHER CHECK _____

  2. Program an LED to flash with a rate of .5 seconds on and 1.5 seconds off.

    TEACHER CHECK _____

  3. Program three LEDs to turn on in sequence with a delay of half a second between each one.

    TEACHER CHECK _____

  4. 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 _____

  5. 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 _____

  6. 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.

  7. 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 _____

  1. Do something interesting!

    TEACHER CHECK _____