Joystick Mouse Control
This project is an interactive system that controls the computer's mouse cursor using a Joystick Module connected to the ACROME SMD. The user can adjust the mouse sensitivity dynamically through a graphical interface and perform mouse clicks using the Joystick Module. The system continuously monitors Joystick Module inputs and responds accordingly, providing a seamless user experience for controlling the mouse cursor.
About Tools and Materials:
SMD Red (Robot Shop)
SMD USB Gateway (Robot Shop)
Joystick Module (Robot Shop)
Step 1: Hardware & Software Overview
Key Components:
ACROME SMD The ACROME SMD acts as the communication hub between the Joystick Module and the computer. It collects Joystick Module data, processes user input, and translates it into mouse movements and clicks.
Joystick Module The Joystick Module serves as the main input device. The user can move the Joystick Module to control the mouse pointer’s X and Y coordinates on the screen. Additionally, the Joystick Module button can be used to trigger mouse clicks.
GUI (Tkinter) A graphical user interface (GUI) is used to display real-time Joystick Module values (X and Y axes), sensitivity levels, and the button status. The GUI also allows the user to manually adjust the sensitivity for finer control.
Project Features:
Real-Time Joystick Mouse Control The system continuously reads the X and Y values from the Joystick Module and moves the mouse pointer based on those inputs. The Joystick Module’s button is mapped to mouse clicks, allowing users to interact with on-screen elements.
Dynamic Sensitivity Adjustment The system features dynamic sensitivity control, which adjusts the mouse movement speed based on the Joystick Module’s input magnitude. Users can also manually set the base sensitivity via the GUI for greater precision.
Graphical Interface for Feedback The GUI provides real-time feedback to the user, displaying the current X and Y values of the Joystick Module, the sensitivity, and whether the Joystick Module button is pressed or released. This ensures transparency in how the Joystick Module movements are translated into mouse actions.
Manual Sensitivity Input The user can adjust the base sensitivity through an input field in the GUI. Once entered, the new sensitivity is applied, and the system updates the sensitivity label accordingly.
Multithreading for Real-Time Control To ensure the mouse control happens smoothly without interrupting the GUI, the system uses a separate thread for handling the joystick inputs and mouse control. This ensures that both the GUI and joystick functionalities run in parallel without delays.
Step 2: Assemble
Workflow:
Joystick Module Data Monitoring The system continuously reads the Joystick Module's X, Y, and button values. These inputs control the mouse pointer’s movements and clicks.
Mouse Movement Control Based on the Joystick Module’s X and Y axis values, the system calculates the new mouse pointer position and moves the cursor accordingly. The movement speed is influenced by both the base sensitivity and dynamic multiplier, which adjusts based on the Joystick Module's movement magnitude.
Button Click Simulation If the Joystick Module’s button is pressed, the system simulates a mouse click. The button press also temporarily increases the base sensitivity for quicker movements.
GUI Updates The GUI continuously updates with the latest Joystick Module values, sensitivity, and button status, providing visual feedback to the user.
Getting Started
Connect the SMD: Connect the ACROME SMD to your PC using a USB Gateway Module or to an Arduino board using the Arduino Gateway Module.
Set Up the Joystick Module: Connect the Joystick Module to the SMD using an RJ-45 cable.
Power Connections: Ensure that the SMD is powered and that all connections are securely made.
Project Wiring Diagram
Step 3: Run & Test
Run the Application:
Execute the provided Python script to start the Joystick Mouse Control application.
Once the application is running, move the Joystick Module to control the mouse cursor on your screen. Experiment with different Joystick Module movements to understand how they translate to mouse actions.
Adjust Sensitivity: Use the GUI to adjust the sensitivity settings for finer control as needed.
Conclusion: This project demonstrates how the ACROME SMD can be used to create an interactive joystick-controlled system for managing mouse movements. By integrating real-time Joystick Module input with dynamic sensitivity control and a graphical interface for user feedback, the system provides an intuitive and customizable solution for precise cursor control.
Last updated