Use your Android phone as a real-time wireless motion mouse โ tilt your phone to control your laptop cursor just like pointing a smart TV remote.
Mouse_controller is a full-stack motion-control platform built using Python, WebSockets, smartphone gyroscope sensors, Android integration, and a modern interactive frontend website.
The project combines:
- Real-time motion tracking
- Wireless cursor interaction
- QR-based device pairing
- WebSocket communication
- Interactive frontend dashboard
- Live telemetry visualization
- Smartphone gyroscope control
- you can check out the front end(ONLY) here:- https://mouse-controller-nine.vercel.app/
- ๐ฑ Control laptop cursor using phone motion
- โก Real-time low-latency communication
- ๐ก WebSocket-based architecture
- ๐ฏ Gyroscope and orientation tracking
- ๐ฅ๏ธ Modern frontend interface
- ๐ Live telemetry dashboard
- ๐ HTTPS + WSS support
- ๐ฒ QR-based instant connection
- ๐ Responsive web interface
- ๐จ Futuristic UI animations
- ๐ถ Live connection monitoring
- ๐ง Motion telemetry visualization
- Open the frontend website
- Click on:
Get Started - The backend server starts the connection system
- A QR code is generated dynamically
- Scan the QR code using your phone
- Allow gyroscope permissions
- Tilt the phone to control the cursor in real time
If you want to run the backend manually:
cd AirMouse
pip install -r requirements.txtpython server.pyThe terminal will display something similar to:
https://192.168.x.x:8443
Open a new terminal while the backend server is still running.
cd main_website
npm install
npm run dev
- Connect laptop and phone to the same WiFi network
- click on get started in the website , it will give you a qr code
- scan it on phone
- Open the generated HTTPS URL in Chrome on your phone
- If Chrome shows:
tap:
Your connection is not privateAdvanced โ Proceed - The motion controller interface opens
- Tap:
Connect - Allow motion sensor permissions
- Start controlling the cursor using phone motion
| Action | Function |
|---|---|
| Cursor Movement | Tilt phone |
| Left Click | Left Click button |
| Right Click | Right Click button |
| Double Click | Double button |
| Scroll | Scroll Up / Down |
| Pause Tracking | Tracking ON/OFF |
| Adjust Speed | Sensitivity slider |
Phone Motion Sensors
โ
โผ
DeviceOrientation API
โ
โผ
WebSocket Communication
โ
โผ
Python Backend Server
โ
โผ
Cursor Processing Engine
โ
โผ
Desktop Cursor Control
โ
โผ
Frontend Dashboard Interface
- Next.js
- React
- Tailwind CSS
- Framer Motion
- JavaScript
- Python
- FastAPI
- WebSockets
- pyautogui
- Android Motion Sensors
- DeviceOrientation API
Mouse_controller/
โ
โโโ AirMouse/ # Python motion backend
โโโ main_website/ # Frontend website
โโโ AirMouseClient/ # Android motion client
โโโ CursorBrowser/ # Android browser integration
โโโ gyroTCP/ # TCP communication experiments
โโโ UDP/ # UDP communication experiments
โโโ 1st.png
โโโ 2nd.png
โโโ README.md
cd main_website
npm install
npm run devSmartphone
โ
Motion Sensor Data
โ
WebSocket Transmission
โ
Python Backend Processing
โ
Cursor Rendering
โ
Frontend Telemetry Dashboard
The frontend dashboard visualizes:
- Connection state
- Motion sensor values
- Alpha/Beta/Gamma data
- Signal status
- Device activity
- Motion tracking state
- Real-time interaction feedback
- Hold the phone parallel to the ground for smoother movement
- Lower sensitivity for precise control
- Increase sensitivity for faster movement
- Use Tracking ON/OFF while repositioning your hand
- Stable WiFi improves responsiveness
- Small wrist movements give better accuracy
| Problem | Solution |
|---|---|
| Cannot connect | Ensure both devices are on same WiFi |
| Cursor jumps | Reduce sensitivity slider |
| Gyroscope not working | Use HTTPS instead of HTTP |
| Phone permissions blocked | Allow motion sensor permissions |
| Connection blocked | Allow ports through firewall |
| Cursor too sensitive | Lower sensitivity in controller |
| Delayed movement | Check WiFi stability |
- HTTPS is used for motion sensor access
- WSS is used for secure WebSocket communication
- Local network communication keeps latency low
- QR pairing helps simplify device connection
- AI-based motion smoothing
- Gesture recognition
- Multi-device support
- Cloud-based pairing
- Public deployment
- Better motion calibration
- Remote internet-based control
- Voice command integration
- Haptic feedback support
Ayush Narayan
BTech ISE โ BMS College of Engineering
This project is licensed under the MIT License.
This project was developed to explore:
- motion intelligence
- real-time communication
- wireless interaction systems
- frontend/backend integration
- sensor-based computing
- interactive web technologies
- real-time device communication

