Closed NafisAhnnaf closed 4 days ago
What is xbox
?
The library is meant to be used with the global XInput
object. The callback from the USB handler calls XInput.receive()
, other class instances will not receive data. If you want to use your own object for whatever reason, you will need to set the callback for the USB API (XInputUSB::setRecvCallback()
) to a function that then calls XInputController::receive()
in order to parse the data. If you want you can also bypass the library entirely and parse the data yourself, again using the lower level USB API.
It is not necessary to do anything in loop()
to handle the data if you are using the callbacks.
No Rumble data or forcefeedback data is being received by the callback function. Is anyone facing a similar issue? Using Arduino Micro.
xbox.setReceiveCallback(rumbleCallback);
Is this line of code enough to receive callback data. I mean in my pc the controller is working fine but there is no forcefeedback feature being shown. I am assuming more initialization codes need to be written in setup() to actually innitiate rumble feature. Also Is there any necessity of a receive() function in void loop() to look for async callbackks or rumble data.?
The callback function.