I got the servo down

I chose to do Sketch 04 from our booklet, the Servo Sweep.

Setting up this initial code and circuit was easy enough, but I then struggled to set up the slight modification with the potentiometer. I tried and tried and wrote the code and copied the code, and consulted the Adafruit tutorial, and hooked it up to outside power (9V battery instead of USB), but no matter what I did, my servo arm just moved in sporadic fits and mostly stayed still.

FINALLY, I figured out the problem. I was trying to share ground and power between both the potentiometer and the servo. They are both three-pronged pieces, after all! How elegant!

EXCEPT that the order of the servo arms is NEG, POS, SIGNAL, but order on the potentiometer is NEG, SIGNAL, POS! So, I let go of my elegant four wire solution and separated the potentiometer and servo, and it worked like a charm.



%d bloggers like this: