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