MHeironimus / ArduinoJoystickLibrary

An Arduino library that adds one or more joysticks to the list of HID devices an Arduino Leonardo or Arduino Micro can support.
GNU Lesser General Public License v3.0
2.13k stars 411 forks source link

Samd21 boards #283

Open aelio opened 10 months ago

aelio commented 10 months ago

Samd21 boards

Hi, I've made minor changes to get the library working on Trinket M0, probably it shall work on other samd boards as well. I used Gary Grewal's MIDIUSB as reference for accessing the platform's USB api. It probably needs some graceful integration, here are the files dynamichid.zip

relaxibus commented 10 months ago

XIAO SAMD21? I didn't understood if the USB is a native USB or just TTL to USB.

aelio commented 10 months ago

USB via USB/PluggableUSB.h, IC is ATSAMD21E18 32-bit Cortex M0+ on this board. Idk if this is native or whatever, I am not an expert, just added some defines to get it working

relaxibus commented 10 months ago

so using native gpos or a SPI to ADC and I2C to GPIO expander we could have a nice solution for a joystick setup using the XIAO? Looking to substitute the https://www.leobodnar.com/shop/index.php?main_page=product_info&products_id=316

NNGB-kor commented 9 months ago

Yes. This seems to work with Xioa's SAMD21. I've compiled and uploaded a simple example. It recognizes it as a joystick.

relaxibus commented 9 months ago

Oh, that's really great!!! Could you send me the example? How did you uploaded to the Xiao? May be you could also (I'm not a coder) try the above idea using native gpios or a SPI to ADC and I2C to GPIO expander?

carramar commented 1 month ago

Yes. This seems to work with Xioa's SAMD21. I've compiled and uploaded a simple example. It recognizes it as a joystick.

can you post how you got it to work please? im trying to get this to work on arduino zero (SAMD21) and cant get it to recognise as anything