PDA

View Full Version : USB HID with Teensy 3?



orvtech
01-10-2013, 09:28 AM
Friends,

I am a noob when it comes to microcontrollers and would like to test the teensy for a couple of projects that involve faking a keyboard.
I see that there are multiple versions of the Teensy, being the Teensy 2 variants the more popular. Is there a disadvantage on using the Teensy 3? does the Teensy 3 support HID (can I fake a keyboard ?).

Thanks in advance.

PaulStoffregen
01-10-2013, 11:28 AM
Both have keyboard. 3.0 is faster, but today relatively few libraries are ported. In time, 3.0 will have much more capability as more code is written and ported. 2.0 is 5 volts, 3.0 is 3.3 volts. Either could be seen as an advantage, depending on the voltage of whatever circuitry you might try connecting. Long term, most things are going to 3.3 volts.

orvtech
01-10-2013, 01:43 PM
Both have keyboard. 3.0 is faster, but today relatively few libraries are ported. In time, 3.0 will have much more capability as more code is written and ported. 2.0 is 5 volts, 3.0 is 3.3 volts. Either could be seen as an advantage, depending on the voltage of whatever circuitry you might try connecting. Long term, most things are going to 3.3 volts.

THank you, just pulled the trigger on the 3.0

anthony keane
01-11-2013, 03:32 AM
Hi Paul,

I received my 5x 3.0 last week and wanted to jump in and play, I have downloaded the 10beta

I have been coding atmel for a while on and off (atmega128) never used Arduino

I have installed AVR-GCC in Ubuntu and the main.cpp compiles and uploades to the 3.0 and the little led does as expected, changed the delay times and still all good.

what I am hopping to use the 3.0 for is to send key presses like a usb_keyboard but I cannot get even a simple test working,

Do U have a non-Arduino .cpp that will send keys to a usb_keyboard that I can build on.

PLEASE :):)

orvtech
01-11-2013, 03:48 AM
actually that code will help me too. :)

PaulStoffregen
01-11-2013, 03:59 AM
Using Arduino, select Keyboard from Tools > USB Type. Then just use Keyboard.print("test") in your program and upload. It's really that simple.

For Teensy 3.0, you're using beta 10, not avr-gcc, right? There's a sample makefile in hardware/teensy/cores/teensy3.