1. Building off of the 03_CylonControllingMultipleLEDs example, create a sketch that:
    • When the potentiometer is turned all the way clockwise, all 6 LEDs are turned on.
    • When the potentiometer is turned only half way, 3 LEDs are on.
    • When the potentiometer is turned all the way anti-clockwise no LEDs are on.
    • Thus, the number of LEDs should be proportional to amount of voltage read by the analog input.

Enjoying more AI Music from Google?

  1. Building off of this week’s examples, attempt to recreate as many of the above LED patterns as you can in less than 2 hours. Some recommendations:
    • For each pattern attempt to determine the following:
      • What do you observe changing? (e.g. led position? light intensity? timing? fading vs. on / of?)
      • In addition to the array of led brightness values, what other variables will you need to keep track of?
      • How are those variables being modified over time?
      • Make a new sketch for each pattern building from our in-class frameworks.
  2. Key questions you are expected to be able to answer after the blinking light project above.
    • Arrays
      • What are arrays and how do you declare them in C++?
      • How do you read elements inside of an array?
      • How do you change or set elements inside of an array?
    • Looping
      • What is a for-loop and why might you use one?
      • What are the three pieces of information you need when you are constructing a for loop and what goes inside the curly braces?
        • (i.e. for( what goes in here? ) { what goes in here? } )
    • If you are unsure of the answers any of those questions, look it up or check your notes. If you are still are unclear post a question to the forum and we’ll discuss it.
  3. Review Number Representation
  4. Reading