PDA

View Full Version : Any time frame for a Teensy 3.0 option with Keyboard and Serial ?



Experimentalist
12-11-2012, 10:07 PM
My current project is on Teensy 2.0 / Teensy 2.0 ++ and uses:

Serial + Keyboard + Mouse + Joystick

I am only actually using the "Serial + Keyboard" elements at present but am itching to port this to the Teensy 3.0

Do you have a rough idea of the time frame for a Teensy 3.0 option with Keyboard and Serial ?

PaulStoffregen
12-12-2012, 11:51 AM
How about right now?

http://www.pjrc.com/teensy/beta/teensy3_12dec12.zip

To use this, replace the hardware/teensy/cores/teensy3 folder with the contents of this zip file. Then edit hardware/teensy/boards.txt to uncomment these 2 lines:

teensy3.menu.usb.serialhid.name=Serial + Keyboard + Mouse + Joystick
teensy3.menu.usb.serialhid.build.define0=-DUSB_SERIAL_HID

The new USB code in Teensy 3.0 is meant to make custom combinations of interfaces much easier. In theory, all you do is edit usb_desc.h and usb_inst.cpp to define a new combination, then edit each of the interface .h files to enable it (so far I haven't found a way to make that automatic, without exposing all the usb_desc.h stuff to Arduino sketches), and edit boards.txt to add it to the Tools > USB Type menu.

I tested briefly with Serial, Keyboard & Mouse, so far only on Linux, and it seems to work. Please let me know how this works for you?

Experimentalist
12-13-2012, 06:58 AM
Paul

Right now is as good as I could hope for !

I will have a go and post my findings

StarkyDe
12-14-2012, 10:40 AM
Hello,

I am absolutely new to microcontroller programming, but I am happy to compile my first programs in this interesting field. Please forgive any dump questions, but something is just hindering me.

I want to build a USB-stick, that emulates a human user in a demonstration environment used at fairgrounds.

With the help in this threat I managed to compile and upload a small programm that types keyboard characters on my Teensy 3.0, i can plug it to any PC and it types characters.

What I still need is typing CTRL, ALT and WINDOWS keys to "emulate" a human user that sends commands to applications (e.g. opening an application with WINDOWS-R, typing and closing it it with ALT+F4).

I tried this using "Keyboard.press" and ".release". But compiling failed, error message is:

===========
usb_keyboard.c.o: In function 'usb_keyboard_press_keycode':
...\cores\teensy3/usbkeyboard.c:240: undefined reference to 'send_now'
collect2: ld returned 1 exit status
===========

It seems there is some library missing/not implemented. Is it my mistake or shall I just wait for an update?

Best Regards,
Markus

Experimentalist
12-14-2012, 08:48 PM
Paul

All seems to be going well so far. Just trying to get my head around the correct way to do things in the 32 bit world

If I have any issues I will post them but seems like you are doing great work as ever

Thanks
Ex.