This week I played around with the servo and analog output labs. I went to the junk shelf and found a little pinwheel to put on my servo. I mapped my potentiometer up to my servo motor through the Arduino so the pinwheel moves when you move the knob of the potentiometer.
I then wrote a little program that let’s you know where you are in your rotation with three indicator lights. As you rotate the potentiometer knob, the light turns green about a third of the way at 60 degrees, then yellow at 110 degrees, then red at 175.
Here’s a video of what it looks like:
And here’s the code: