Bluetooth air mouse using MPU6050 and ESP32

n1rmal
Posts: 1
Joined: Sat Nov 16, 2019 9:49 am

Bluetooth air mouse using MPU6050 and ESP32

Postby n1rmal » Sat Nov 16, 2019 9:59 am

Hi all,

I'm trying to make a BLE HID based air mouse using ESP32 and MPU6050 3-axis gyro & accelerometer, i am using this code for ble hid mouse and this mpu6050 driver.

So far i am able to move the mouse cursor using only the gyro values ( in Degrees per second, from the driver ) and (as expected) there is no accuracy at all.

I want to know how should i use the accelerometer values , or any tips on improving the accuracy.

thank you

chegewara
Posts: 2240
Joined: Wed Jun 14, 2017 9:00 pm

Re: Bluetooth air mouse using MPU6050 and ESP32

Postby chegewara » Mon Nov 18, 2019 10:02 am

It all depends how your mouse should react on moves. For example you can use only gyro to set cursor absolute position, which requires to change mouse report map just a bit, or you can use relative positioning and combine gyro + accel to calculate relative value sent as cursor move.

TonyMaz
Posts: 2
Joined: Sun Mar 14, 2021 10:45 pm

Re: Bluetooth air mouse using MPU6050 and ESP32

Postby TonyMaz » Fri May 21, 2021 1:53 am

Hi @chegewara and other ppl,

Im cloning this proyect:
https://github.com/n1rml/esp32_airmouse
From the autor of this post.

But when i move the cursor a little bit faster than normal i get something like stuck movement of the mouse, like It cannot read fast values from the mpu6050 or something like this...

@Jeff Rowberg told me that i dont need the dmp process and i just need to use raw inputs from gyro on two axes to make It relative movement but im very noob to implement on this proyect...

Can hoy help me please?

Thanks in advance!!

I

Who is online

Users browsing this forum: Baidu [Spider], Google [Bot], Majestic-12 [Bot] and 236 guests