It is the only source on the Internet I could find where people have gotten Bluetooth Keyboards/Mice to work on the ESP32 with the Arduino IDE.
I open this issue on your fork (@chegewara) because the original esp32-snippets repository has been archived and thus I can't add a comment to the linked issue.
I have a question about a piece of code that you provided: right here
I tried it with a Linux device and with an Android device. On both devices the code was moving the mouse pointer up/down instead of scrolling the mouse wheel up/down.
I was wondering if you could help me out getting this to work (scroll instead of mouse move) and maybe even help me understand how inputMouse->setValue(...) works in general. I couldn't make any sense of how the table or the reportMapMouse variable in that code translate to { 0x00, 0x00, -0x01} in the end.
My poor guess from looking at the table
// Byte | D7 D6 D5 D4 D3 D2 D1 D0
// ------+---------------------------------------------------------------------
// 0 | 0 0 0 Forward Back Middle Right Left (Buttons)
// 1 | X
// 2 | Y
// 3 | Vertical Wheel
// 4 | Horizontal (Tilt) Wheel
is that the byte column refers to the bytes in the array. So { 0x00, 0x00, -0x01} would mean the first byte indicates the button (0x00 probably meaning no button?), the second byte refers to the X-axis (0x00 meaning don't move on the a-axis) and the last byte refers to the y-axis (-0x01 meaning "move up by 1 unit on the y-axis"). If that logic was correct that I would have guessed that { 0x00, 0x00, 0x00, 0x09} would scroll the wheel down by 9 units and not move the mouse and not press a button. But unfortunately it doesn't do anything at all and I still have no clue what the 3 in setValue(msg,3); could mean.
I just stumbled across this issue: https://github.com/nkolban/esp32-snippets/issues/230
It is the only source on the Internet I could find where people have gotten Bluetooth Keyboards/Mice to work on the ESP32 with the Arduino IDE.
I open this issue on your fork (@chegewara) because the original esp32-snippets repository has been archived and thus I can't add a comment to the linked issue.
I have a question about a piece of code that you provided: right here
I tried it with a Linux device and with an Android device. On both devices the code was moving the mouse pointer up/down instead of scrolling the mouse wheel up/down.
For example:
This causes my mouse to move UP.
I was wondering if you could help me out getting this to work (scroll instead of mouse move) and maybe even help me understand how
inputMouse->setValue(...)
works in general. I couldn't make any sense of how the table or the reportMapMouse variable in that code translate to{ 0x00, 0x00, -0x01}
in the end.My poor guess from looking at the table
is that the byte column refers to the bytes in the array. So
{ 0x00, 0x00, -0x01}
would mean the first byte indicates the button (0x00 probably meaning no button?), the second byte refers to the X-axis (0x00 meaning don't move on the a-axis) and the last byte refers to the y-axis (-0x01 meaning "move up by 1 unit on the y-axis"). If that logic was correct that I would have guessed that{ 0x00, 0x00, 0x00, 0x09}
would scroll the wheel down by 9 units and not move the mouse and not press a button. But unfortunately it doesn't do anything at all and I still have no clue what the3
insetValue(msg,3);
could mean.