-
Notifications
You must be signed in to change notification settings - Fork 197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature Request] Add motion sensor support #141
Comments
I guess it's possible |
Thanks @lemmingDev I don't think the feature is a high demand feature. Basically got an IMU and saw a video giving me an idea - https://youtu.be/3qlZmXnE1mw. Only two user cases I could think of, as per the video, aim assist/direction from motion movement. Another would be steering wheel like the Wii did it, without using the direction hat or joysticks. No HID examples, other than what PS4/5 or possible XBox controller, but they looked very none standard. The other thing that comes to mind, is what would use this feature, ie: SDL or picked up by OS Utility like If I find more info, I will added. Welcome to add |
Video of somebody using gyro aim - https://youtu.be/njIj-I3VPZg?t=814 |
We could map a gyroscope to any of the existing axes with code without modification to the library. I guess we could add it as an individual thing like with the simulation controls Going through all of the old issues You still want me to look into it? |
oh I see @lemmingDev cleaning out all them old issues, thanks! Mapping to a set of standard axes could be done, thou I don't know what that math would look like. I was thinking more about exposing like gyro aiming assist or something like - https://help.rewasd.com/how-to-remap/gyroscope.html Then it would be up to the host device to do as it needs with the IMU readings. I don't know what Windows/OSX would do with these |
Greetings @lemmingDev , hoping I could ask for assistance with adding a |
Hey @LeeNX , did you have any progress in your venture? |
I have to admit, I am not sure where I put this sensor. My focus has been on other projects where ESP32-BLE-Gamepad will be useful. I currently don't have a use case for IMU sensors in antBot, thou if anybody can think of a way it could be used to be an advantage, I am all ears. Only thing worse than my coding skills is my battle bot controls skills. '-) |
I'm currently developing a wireless head tracker for use in simulation games. I'll let you know if you want :) |
How did this go? |
Well, I got a project and wasn't able to finish it yet :( Once I do, I will update here. |
Ooh - I just added motion support using desktop page versions without referring to this post with sensors page I will quickly try these ones out and see how they go |
On Windows or other host devices or OS? Looking at a few other HID, not seen any that use a standard usage page, normally all devices use a custom usage page. For example - https://gist.github.com/ToadKing/b883a8ccfa26adcc6ba9905e75aeb4f2
Would you mind pushing a branch with your work-in-porgress with the 0x20 sensor usage page. Could be something that I could look over and possible use for a base. I did not know as much about BLE devices and how host OS are needed to support the different kind of devices when I opened this feature request. Would be nice, but I don't think many, if any, of the host OS will have support for this. I don't have the skill to get support into other tools or host like Linux, still working on the PlayerLED stuff, which I think has more use or part of a stepping stone type thing. |
Yeah - I don't think 0x20 sensor usage page should really be used for a gamepad I think if we wanted to have it plug and play, and not eat up 6 out of the 8 available axes, we'd need to emulate a ps3 or 4 dual shock or something with custom pages that uses a driver or companion app I think its not really in our scope, though maybe in a fork, similar to the xinput one I deleted the page 0x20 test code already, but its super simple to modify the one file again
|
ok - here is the updated BleGamepad.cpp Test with latest master files and https://github.com/lemmingDev/ESP32-BLE-Gamepad/blob/master/examples/MotionController/MotionController.ino Search for 'Gyroscope' near the hid descriptor section and you'll find it Very easy to modify to test other things |
More a place holder for info to get motion support into the library.
Extend the library to support motion feedback, much like PS5 Dual sense controller, basically reporting something like 3 axis accelerometer and/or 3 axis gyroscope.
I have seen info on HID/GATT characteristics and will follow up with more info, but possible?
Sensors Page (0x20)
Usage ID:
The text was updated successfully, but these errors were encountered: