Skip to content

Mouse cursor movement and left click simulation with SerialPort library and Arduino

License

Notifications You must be signed in to change notification settings

r-aguilera/MouseControlWithArduinoJoystick

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🖱️ Mouse Control with Arduino joystick 🖱️


C++ Library to control your mouse, using SerialPort library.

Circuit Diagram

Just a common 5 pin joystick, USB cable and jumper wires:

How to build and use

CMake and Visual Studio

Cmake:

Where is the source code: YourDirectory/MouseControlWithArduinoJoystick

Where to build the binaries: YourDirectory/MouseControlWithArduinoJoystick/build

Create the directory if applicable, configure then generate. Build all in Visual Studio.

Execute SerialPortExecutable.exe then uppload joystickSendData.ino to your Arduino.

Move the joystick to control the mouse cursor and push it to press right click button!

Issues

- C++ executable must be opened before connecting Arduino (crash otherwise)

Just a beginner, this is probably due to my lack of telecommunications concepts.

- Disconecting Arduino causes runtime crash

Maybe better arduino->isConnected() checks can solve this problem.

- Random crashes are few and far between, but there are

Serial buffer issue?

About

Mouse cursor movement and left click simulation with SerialPort library and Arduino

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published