1. Review the “mystery” code. Make sure you understand how bitRead(...), bitWrite(...), bitClear(...) and bitSet(...) and bit(...) works and how bitRead(...) is used to determine the output of each LED.

  2. Building on the DebounceDemo extend the program to do the following:
    • A button press will cycle through four states
      • “OFF”
      • “ON”
      • “Blinking”
      • “Fading up and then down” (and repeat)
  3. Building on the DebounceDemo create a program to do the following:
    • Upon a button press, an led goes to full brightness then slowly fades to off.
    • If at any point the button is pressed, the brightness immediately goes to full brightness.
  4. Reading / Watching