Components and supplies
Rotary potentiometer (generic)
Jumper wires (generic)
Breadboard (generic)
Arduino Nano R3
Modulo Joystick
SG90 Micro-servo motor
Project description
Code
DaCode
c_cpp
The map function converts 0-1023 to 0-180 because the joystick/potentiometer can input a value from 0 to 1023 while the motor can move from 0 to 180 degrees.
Downloadable files
I just realized my circuit images are horrible.
In this circuit I show you the potentiometer version, you can replace it with the joystick just by connecting the red wire to 5v, the blue one to GND and the green one to the x or y axys pin; you could also use both the joystick and the potentiometer at the same time by connecting them both to A0.
I just realized my circuit images are horrible.
I just realized my circuit images are horrible.
In this circuit I show you the potentiometer version, you can replace it with the joystick just by connecting the red wire to 5v, the blue one to GND and the green one to the x or y axys pin; you could also use both the joystick and the potentiometer at the same time by connecting them both to A0.
I just realized my circuit images are horrible.
Comments
Only logged in users can leave comments
gidump
0 Followers
•2 Projects
0
0