Go Down

Topic: [RESOLVED] Connecting an usb joystick to Arduino Due using Native usb port (Read 3319 times) previous topic - next topic

DANNY003

I would like to know how to connect my joystick (logitech dual action: https://support.logitech.com/en_us/product/dual-action-gamepad ) to Native usb port of Arduino Due.

A library already done is USBHOST (https://www.arduino.cc/en/Reference/USBHost) compatible with Due,
but it works only with mouse and keyboard.

Is there someone who has integrated to the library USB HOST, to use it with a joystick?

Thank.


DANNY003

in the library is written "Arduino library that allows an Arduino Leonardo, Arduino Micro, or Arudino Due to appear as a Joystick or Gamepad.", so I don't think it goes well.

ard_newbie

OK. A library for an HID joystick attached to the USB Host remains to be written (certainly a lot of work), BUT:

There is a library for a USB HID Mouse attached to the USB Shield, and a library for a HID joystick attached to the USB shield too. This could be a starting point to adapt a version for the DUE Native USB2.0 as a USB HID Host for an HID joystick Device:

Compare e.g. the USB Host library for a HID Mouse and the one for the shield and understand differences so that you can adapt the library below for the DUE USB as a USB HID Host for an HID joystick Device.

https://github.com/felis/USB_Host_Shield_2.0/tree/master/examples/HID/USBHIDJoystick


DANNY003

#4
Aug 10, 2019, 05:09 pm Last Edit: Aug 13, 2019, 05:51 pm by DANNY003
Since there was no library to satisfy my needs, by changing the UsbHost library (in particular the mouse example) I created the possibility of using a USB joystick (in particular I used my joystick which I talk about above).
Attached is the new version of the library, with the basic example of the joystick.

Go Up