For my project, I was looking at using a stack like LUFA to program the embedded Curie to appear as an HID USB Keyboard. I want to program it to read the GPIOs to trigger key-presses in the host OS. Probably with a Muxer shield to get a few more i/o. (I need about 30 for what I'm doing) I know that some Arduino Uno and all of the Leonardo can appear as a programmable USB device (like keyboard). Can the Curie/101? Has anyone seen a tutorial or code sample?
It appears not. I believe because the Curie has 2 CPU's and the CPU that is controlling the USB is not the CPU that is doing I/O. They (Intell) did not make firmware to support this function. There is a Curie BLE HID library somehere that simulates a keyboard over Bluetooth but quality unknown. See also: https://www.udoo.org/forum/threads/genuino-101-to-control-keyboard-solved-but-contentions.7709/ Does your programm on the OS only accepts keyboard presses or can you reprogram it to accept characters from USB directly? Because then you can Curie send those characters to the USB with Serial.print()
I guess I could use serial, but I was hoping to take advantage of DMA or Interrupt signaling rather than serial I/O and buffering. HID Game Controller would be closer to my intention. I have an external board that is currently doing the I/O, I was hoping to consolidate it onto the Udoo to reduce my power and space requirements.
idea 1) "what about plug an Atmel32u4 board on your curie serial already enabled controller?" The atmega32u4 is the second chip on arduino uno (Ok i'm simplifying). This chip usually handle usb to serial connection via CDC protocol and In Circuit "Serial" (again? Really? not sure ) Programming (ISCP) for part talking with arduino main chip, but you can reprogram it to handle HID on USB (instead of CDC on USB) and still use ICSP/SERIAL for curie talk) Maybe more clear, on a UNO with PC CPU->USB->atmel32u->serial->main_arduino_chip on the UDOO CPU->CURIEchip1dontTOUCH->CURIE_MAINCPU well you could do: CPU->CURIEchip1dontTOUCH->CURIE_MAINCPU + CPU->USB->HIDatmel32u4->serial->CURIE_MAINCPU use that arduino functions https://www.arduino.cc/en/Reference/MouseKeyboard maybe with a board like that... https://www.sparkfun.com/tutorials/337 idea 2) just destroy a usb keyboard http://archives.funlab.fr/MakeyMakey_DIY (OMG I just notice it is.. uh... was... a working keyboard that I repaired before somes mates ruin it for science, look, it has red 3D printed feets!) This solution has the advantage to be other computer-plugable easily but as reverse solder 30 pair of wire can quick become a mess
I'm using my Udoo x86 to build a mini arcade cabinet. I already had a small USB controller for the joystick and buttons, but I wanted to simplify it into a shield to reduce the space and power requirements. I'll probably have to leave it as a separate board for now. I'm currently using one of these Picade PCB boards. and I wanted to consolidate.
You could read the serial input of the Arduino (with python) and translate it into keystrokes. I don't know the latency it will create and if it will be small enough. https://stackoverflow.com/questions/13564851/how-to-generate-keyboard-events-in-python
yup. The buffering necessary to read serial input means that it will have some annoying latency issues. It also means that I have to have a daemon or process running on the host system to do the reading. I was hoping to use an off-the-shelf distro or build..... thus the USB-HID. The less custom coding on the Udoo Host OS, the better.
I suppose you already have found this arduino 101 topic: https://forum.arduino.cc/index.php?topic=425505.0 As an alternative you could go Bluetooth to Bluetooth if you add a bluetooth dongle to the OS side of the Udoo X86 (or use the Udoo X86 Wifi/BT M2 adapter): https://forum.arduino.cc/index.php?topic=478404.0