For this challenge, I needed to create an LED light bar circuit, and run code on it to emulate the style of KITT from the 1980s TV Series Knight Rider (a demonstrative video). I chose to add to this challenge by incorporating a potentiometer into the design that changes the speed of the light bar animation.
The Schematic:
The Code:
The Circuit Working:
Reflection
The easiest part of this challenge was wiring up the circuit, because since I had a schematic to follow I just needed to copy it. The hardest part of this challenge was figuring out how to wire and code the potentiometer, because the lesson that explains how to do that comes after this challenge. I could have easily used that lesson as a resource, but I wanted a challenge so I just went with the power of Google. In this challenge, I learned how to wire a pot, how to configure a pot in code, and how to map one variable range to another one, in order to map the 1023 possible pot positions into the range of 2 - 255 milliseconds. For the next challenge, my goal is to go beyond the requirements again to make something interesting.
Comments