Emulate keyboard over USB ?

Libraries, utilities, bootloaders...

Re: Emulate keyboard over USB ?

Postby Myndale » Tue Oct 13, 2015 10:07 pm

I've used V-USB myself in the past, it works well. Won't work on Gamebuino though without additional hardware, here's why:

The very early Arduino boards used a serial port which then required a USB-to-Serial cable once serial ports started going the way of the dinosaur. This eventually led to boards like the Arduino Extreme which ditched the serial port for a USB port and an FTDI chip while cutting out the middle-man (i.e. RS232-C) in the process.

This created a couple of new problems. First of all, it forced the Arduino to always be a serial device. Secondly the chips were somewhat expensive. So the folks at Arduino replaced the FTDI with the ATmega16U2, which is basically a scaled-down version of the main ATMega328p chip containing USB-to-Serial firmware. They also gave both chips their own ICSP port for programming with a hardware programmer:

Image

So using V-USB you can easily reprogram the ATmega16U2 to be a keyboard/mouse/joystick or generic HID etc. You still have to manage any communication between it and the main chip via the RX/TX link but hey, you now have two chips to play with instead of one. The problem (if you can call it that) with Gamebuino is that it doesn't use the ATmega16U2, it uses an FTDI, thus effectively dooming it to forever appear as a serial device. If you want Gamebuino to be anything else then you need at the very least to physically wire a USB connector with resistors and zeners etc connected via the I2C pins.
Myndale
 
Posts: 507
Joined: Sat Mar 01, 2014 1:25 am

Previous

Return to Software Development

Who is online

Users browsing this forum: No registered users and 2 guests

cron