Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8013

Other projects • Re: Using a Raspberry Pi 4 as a Virtual Mouse

$
0
0
You can set up a Pi as a Bluetooth mouse with code from here:

https://github.com/petzval/btferret

The mouse.c code reads the Pi's mouse and sends to the PC, but can be modified to send user-programmed mouse positions.

Code:

DOWNLOAD  mouse.c  btlib.c  btlib.h  mnouse.txt  EDIT  mouse.txt to set ADDRESS=Pi's address (RUN mouse which prints instructions for this)  COMPILE  gcc mouse.c btlib.c -o mouseRUN  sudo ./mouse  From a PC (Windows example)  Settings/Devices/Bluetooth on  Add Bluetooth or other device/Bluetooth  The Pi should show up as "HID" and will connect as a mouse

Statistics: Posted by petzval — Sun Mar 30, 2025 3:14 pm



Viewing all articles
Browse latest Browse all 8013

Trending Articles