felis / USB_Host_Shield_2.0

Revision 2.0 of USB Host Library for Arduino.
https://chome.nerpa.tech
1.79k stars 779 forks source link

Usb.Task lockup with PS3 controller #774

Open Fizzi1470 opened 1 year ago

Fizzi1470 commented 1 year ago

Hi, i seem to be experiencing the same issue as #495

most of the time, when I move my robot (lot of vibrations when getting to speed, as it uses omni wheels), the USB.Task seem to enter an infinite loop, which triggers the arduino whatchdog an resets it (i've got it on 1s) on top of that, i'm not able to reconnect the controller unless I powercycle the entire robot (reseting either the shield or the arduino doesn't help)

I'm using an arduino mega to talk to the host shield mini trough a level shifter

programs can be found here : https://github.com/Fizzi1470/CDFR_Jr_GameTeam/tree/main/RobotV5_PS3 (note that there is a lot of commented lines and stuff here and there/code missing as i'm trying to get the controller to work reliably for now)

also note that i would rather not powercycle the bluetooth dongle as

i don't exclude my code being the problem here, but I really don't see anywhere that could be locking up in such circumstances

Fizzi1470 commented 1 year ago

Also: i ditched the SwitchPro controller as it was disconnecting randomly after 1-5 minutes (without the robot moving or anything) if i added any of my code to the example for the controller, that's why i switched to a PS3 controller, that doesn't seem to randomly disconnect as the switch controller was doing