dmadison / ArduinoXInput

XInput library for USB capable Arduino boards
http://www.partsnotincluded.com/arduino-xinput-library/
MIT License
361 stars 61 forks source link

XInput.getRumbleLeft() and XInput.getRumbleRight() byte structure #86

Closed baritonomarchetto closed 1 year ago

baritonomarchetto commented 1 year ago

Hello Dave, this is not an issue but a help request :)

I am trying to figure out what is the structure of the rumble byte the library returns when the functions XInput.getRumbleLeft() and XInput.getRumbleRight() are called.

I suppose the byte could include the pad number, in example. How could I isolate the bare rumble intensity (frequency?) value?

Thanks in advance for the help!

dmadison commented 1 year ago

XInput.getRumbleLeft() and XInput.getRumbleRight() return a single byte (0-255) representing the intensity of the rumble. There is no fancy encoding going on.

baritonomarchetto commented 1 year ago

Thanks Dave!