This week has been my favorite Arduino exercise for a few reasons:
- I didn’t need to ask anyone for help! (Using this post to give myself a digital pat on the back)
- Unlike the Arduino code for “Fade”, the Potentiometer gives you more power to control the brightness of the LED by physically rotating the wheel to change the value of the input
The scenario in action:
As the LED is dimmed, the input value is lowered, and as the LED increases brightness, the value input raises in value.
This was a fun assignment to use the potentiometer! Especially cool playing with the little motor.
Analog Input with one LED was pretty fun, but with only two additional lines of code I could get TWO LEDs to alternate brightening and fading in response to the pot. Wayyyy more fun!
I wasn’t trying to go so slowly in the video but it was kind of hard to turn the pot (stir the pot?). Hope you like it!