Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 3 of 3

Thread: Teensy added function to keyboard and joystick

  1. #1
    Junior Member
    Join Date
    Aug 2013
    Posts
    2

    Teensy added function to keyboard and joystick

    New to Teensy...

    I would like to create some foot pedals and switches to assist with playing a PC video game. Running Windows 7 64-bit with a USB Keyboard and Joystick. My design for controls are:

    - Programmable keyboard button to a push-to-talk foot switch; momentary; normally open
    - Analog throttle foot pedal
    - Programmable keyboard button to a latching foot switch; whereas, pushing the switch again unlatches
    - Programmable keyboard button to a non-latching foot switch; momentary; normally open

    I am thinking on using standard guitar/keyboard pedals and switches as the interface. They are heavy and likely will not move around on the floor much. Likely, guitar pedals are better made than this crappy FS1_P pedal and its software.

    Questions:

    1. Which Teensy would be able to be listed in Windows 7 and Windows 8 as an additional USB HID Keyboard and Joystick simultaneously?
    2. I have carpet in my home, and during the winter months I have static discharge moments -- which Teensy would be best?
    3. Which Teensy is the most reliable and trouble free?
    4. Can I connect one Teensy simultaneously to two different computers having push-to-talk on one computer and the remaining design functions on the second computer?
    5. Where can I get PCB made that are socketed for Teensy?

    Thanks for helping out. I am a one-handed disabled veteran now and cannot use the keyboard and the joystick base buttons while playing a computer game.

  2. #2
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    21,467
    Any of the Teensy boards should work. All Teensy 2.0 and 3.0 support USB HID keyboard and joystick. You select the USB from Arduino's Tools > USB Type menu.

    All microcontrollers are sensitive to electro-static discharge. If any I/O signals are exposed output a grounded metal enclosure containing the Teensy and your mechanical switches, you'll almost certainly have to add some ESD protection parts to have it reliably withstand repeated shocks.

    Teensy can only connect by USB to one computer. That's simply how USB works. Much more info is available about USB, if you're interested.

    To have 2 computers receive the same data, or similar data, or even different data based on the same physical switch inputs, you'll need 2 Teensy boards. However, you can wire the same switch to 2 different boards and have each programmed to send data to each PC when they see the same signal. Each PC's USB host controller chip is in control of USB bandwidth to each Teensy, so the data may not arrive at each PC at exactly the same time. You can probably achieve results within about 2 ms. Tighter timing than 1 to 2 ms isn't easily achievable with USB.

    For making your own PCB, the most popular choices are OSH Park (USA) for relatively small boards, or iTead & Seeed (China) for larger ones. When you compare prices, don't forget to factor in shipping. Usually "small" (cheaper at OSH Part) is under about 6 square inches. The OSH Park boards are also much higher quality, which matters for really advanced designs, but probably isn't a big deal for just connecting switches to Teensy. Also, Lean (who runs OSH Park) is a really nice guy.
    Last edited by PaulStoffregen; 08-20-2013 at 03:49 PM.

  3. #3
    Senior Member
    Join Date
    Jan 2013
    Posts
    966
    I can vouch for the OSH-Park quality. I've desigend a LED driver and ordered prototype boards (with 12mil vias) from iTead. On some of the pads the drills so off-center that the drill circumference intersects with the outter circumference of the pads.

    The boards for my Frankenduino prototypes are from OSH-Park (13mil vias) and the drills are dead center!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •