I wanted to find a project that controlled a servo. I found one that controlled it using a potentiometer. Since analog joysticks use two potentiometers, I slightly changed it to work with a joystick. Enjoy.
* note: if you don't have a joystick, here the project that used the potentiometer.
https://www.hackster.io/Treebug842/servo-moter-with-potentiometer-32c0fb
here are the schematics:
SchematicsServo connections
Connect the darkest wire of the servo to GND
Connect the second darkest wire to 5v
Connect the lightest wire to D7
Joystick connections
Connect GND to GND
Connect +5v to 5v
Connect VRX or VRY to A0
Comments