Joystick Controlled PC Mouse Using Arduino UNO
by prabeenraj01 in Circuits > Arduino
2574 Views, 1 Favorites, 0 Comments
Joystick Controlled PC Mouse Using Arduino UNO
In This Tutorial We are going to see how to make joystick controlled pc mouse by using Arduino Uno
Required Components:
For this we need arduino board (*You Can Use Any Arduino Board)
joystick Module
Potentiometer (If you don't have joystick Module)
Push Buttons
few jumper (male to female)
Circuit Connection
1) First make the circuit as per the schematics
if you don't have joystick use the circuit that have potentionmeter
Connection For joystick Module to Arduino
Joystick Module Arduino Code
GND GND
Vcc 5V
VRx A0
VRy A1
Sw D8
Connection For Potentiometer to Arduino
- Connect the two potentiometer 3rd pin to 5v of Arduino
- Connect the two potentiometer 1st pin to GND of Arduino
- Connect one potentiometer center pin that is (wiper) to Analog Pin A0 in Arduino
- Connect another potentiometer center pin to Analog Pin A1 in Arduino
- Connect the push button to Digital Pin D8 (for using as left click of mouse)
Upload Arduino Code
Execute Python Code
Program LINKNow Run the python script . This script make the serial communication with arduino
Before executing the program
Install the Required modules Like Pyserial and Pyautogui
pip command for pyserial : pip install pyserial
pip command for pyautogui : pip install PyAutoGUI
Run this above command in Terminal By run as adminstrator mode
And Don't forgot to enter your arduino port number
Now Run the code