For homework this week I was given a Servo to play with. I chose to figure out controlling it with a potentiometer, using doggie snacks as a prop for a laugh.

I began with just figuring out how to wire and code for the Servo to work automatically.

Next, I added in the potentiometer to control the swing arm—doggie snacks under control.


Finally, I added my very confused dog as a user of the #snackmobile to make it more fun.

 

Here is the code:

Scooby Snacks.