Using Moteino M0 as a USB keyboard

Started by paulmalko, June 21, 2018, 12:11:31 PM

paulmalko

Can the Moteino M0 behave like a USB keyboard?  My application is to use it as a game controller for a retro arcade and, hopefully, the ras-pi will think it's a generic keyboard.

I'm asking because the Arduino Zero has 2 USB ports, but the Motino M0 only has one.

Thanks.
Paul

Felix

Sure, it can act both as:


  • USB device - ex a USB keyboard to a host PC/Pi/computer
  • USB host where a USB device can be connected to it via the USB-micro + USB-OTG adapter - a keyboard for instance that the M0 can read. In this case the board has to be powered via the VUSB pin (5V) which powers both the M0 itself and the USB device (keyboard?) attached to its USBmicro jack.

Does this make sense?
See the M0 guide page for some examples (arduino built in USB examples) that work great on Moteino M0.

You would then need a library for any other USB-device (like a joystick) that would allow the MoteinoM0 to interact with it, similar to the Ardiono Keyboard.h library.

paulmalko

Thanks for the info.  Sorry, for bothering you, I didn't recognize that web page expanded.

Felix

You're welcome, no problem at all,
I try to add more info as I develop it or it becomes available, or even as folks request it.
Thanks for being active in the forum, and if you end up doing something cool with MoteinoM0 USB Host/Device modes, please consider sharing your project!