• This topic is empty.
Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
  • #9957

    Bluetooth Headmouse

    Project Image

    This projects provides a method for an alternative mouse input over Bluetooth with head movement. The project uses one or more RN-42 Bluetooth module (version 6.03 or later) to send HID (mouse pointer and button commands) reports to a computer or phone. Mouse movements are related to the movement of an MPU6050 (gyroscope) placed on the side of the users head (e.g. respirator mask, headband, hat, eye glasses earpiece…). This has been tested on Android (Apple phones won’t work), Windows and Ubuntu.

    Optional: Any switch that the person can access. I use 4 micro light switches (2 head mounted and one each for my left and right index fingers).

    The C++ code is straightforward.
    I have ALS and only limited head and finger movement but I am able to completely control my phone (almost like having working hands again). I have full access to my computer (I use a lot of Fusion 360 and this system works great).

    The schematics, code, and 3D print files for power wheelchair button mounts (left and right, hand and head) are available at the GitHub repository linked below.


    Connect Arduino MEGA, RN-42 (use one module for each device) , 4 buttons and the MPU6050 as outlined in HeadMouse.fzz.

    Run HID_Config.ino, to configure the RN-42 Bluetooth Module. This sets the RN-42 to the combo(mouse and keyboard ) profile.

    Pair RN-42 modules with devices (phone and computer). This step is simply pairing a Bluetooth device from the phone or computer.

    Upload headMouse.ino to the microcontroller.


    If the pointer moves while the MPU 6050 is stationary, run calibrate_gyro.ino with the MPU6050 stationary. Update values of averageX and averageZ in headMouse.ino.


    Project Need

    Created by

    Capabilities Needed

    Time to Complete

    Cost to Build

    Creative Commons License




    Project Page

    Project Page


    @Professor.Zia and @michaeljd33 let me know if this is something you can do? I may be able to figure it out but I have a feeling it’ll be easier for one of you guys? Just a quick question… this seems to possibly need calibration and tweeking of the file? How does this all work while we’re social distancing? I’m assuming there is someone physically there that can mount and calibrate?


    Calibration can be done beforehand. As long as the mouse is stationary while the gyro is at rest.



    That’s great news! Thanks for letting me know.


    Thx so much for your reply!


    I looked up project details on github. It is well within my capabilities and the volunteer student members at City Tech can help too. I even have some ideas for improving the hardware and bring the cost down. I will start working on a prototype. Will be able to dedicate more time after end of May when Fall semester is over.


    OK great! I haven’t gotten a reply from my email yet. I’ll send another one or try to reach out through the forum.



    Adafruit has some really great products.

    This is an all in one solution but is often out of stock.


    these products are more often in stock



    I’m happy to provide the code if you’re interested.





    Hi Mike, thank you for the links. And I would like to get the code, please. I think you are referring to code for Adafruit board.


    Hi Farrukh,

    I have attached the code for a simple head movement controlled mouse pointer and a picture of how I wear it.

    I’m happy to clean up this code and add what’s needed for the button presses if you think you’ll use it. Please note that I have the sensitivity of the pointer set really high because I use it in bed, which really limits m6 head movement.

    I also made a very simple app for Android that mimics finger swipe up and down. I use this for scrolling because Google Chrome and Gmail don’t respond to mouse drags. Let me know if you’re interested.



    [hid_mouse_BLE.ino|attachment](upload://ehVEIo7r1rOKNa6HMdUyxLLVNdM.ino) (3.71 KB)


    thx for helping

Viewing 11 posts - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.