Teensy 3.2 HID - Can I receive info from PC as well as send keyboard commands

Status
Not open for further replies.

DrAlbany

Member
Hi guys...,

I'm new to Teensy and started my first project which is now working, but I want to enhance it.

I'm using a Teensy 3.2 as a keyboard HID device to send key codes to a windows PC this is to control OBS (Open Source Broadcaster) and xSplit.

I have buttons with LED's that when pressed will send a keycode to the PC and switch scenes on OBS and xSplit and the LED illuminates so you can see what scene has been selected.

You can also change the scene in Windows by clicking on the scene, but my device is then out of sync.

While in HID keyboard mode can I also listen for signals from the PC so I can syncronise the LED's on the Teensy with the same scene that may have been changed on the software.

Hope that makes sense :)

I have spent a couple of hours searching google, but can't find what I'm looking for, only people using the Teensy/Arduino as a serial port.

I'm sure I can write a plugin for OBS and xSplit to send some command to the Teensy when a scene is changed via the software.

Thanks in advance.

Steve
 
The Tools->USB Type menu in the Arduino IDE allows you to select a combination of Serial + Keyboard. So, after compiling and uploading your sketch, the Windows PC will not only see an USB keyboard, but also a Serial port. On the Teensy code side, you'd have to add an event listener for incoming serial communication, and on the Windows side, you'll have to send your scene status over serial. It's no witchcraft. :)
 
Status
Not open for further replies.
Back
Top