Have anyone had any experience with this before? I've got a few question around a custom control I'm considering making.
Is there any other options out there similar to this, essentially accepting "keyboard" inputs via switches?
![]() ![]() |
So you're wanting to turn button presses into PC Keyboard inputs? Teensy seems like a good option - https://www.pjrc.com/teensy/td_keyboard.html
I'm using a couple of Teensy 3.5's for projects and they seem just fine, though I am moving to ESP32 to add wifi
they/them
Prodigi - Optimised IT Solutions
WebOps/DevOps, Managed IT, Hosting and Internet/WAN.
danielfaulknor:
So you're wanting to turn button presses into PC Keyboard inputs? Teensy seems like a good option - https://www.pjrc.com/teensy/td_keyboard.html
I'm using a couple of Teensy 3.5's for projects and they seem just fine, though I am moving to ESP32 to add wifi
Cheers for the reply.
Yes, I'm thinking or making a few on/off switches, button presses and dials on a panel to interact with simulator.
Jaycar and AliExpress have a variety of switches super cheap and a Teensy itself seems cheap too.
If you don't mind, I have a few questions:
1: What's the programming language or what's is based on? (I'm familiar with basic VB.NET and intermediate PHP, Mysql)
2: Is it tricky/hard to wire up? What tools to you need?
3: Could you have multiple Teensy in a USB bank if needed?
4: How many buttons could a teensy 3.5 have?
5. Where did you get your Teensy from? Is there anywhere in NZ or AliExpress the way to go?
6. Do you know if on/off, button press and turning dials are all supported?
7. Are there any requirements on what switches can be used? Do I need to look for anything? Would the Jaycar link below work (random example)
https://www.jaycar.co.nz/spst-momentary-toggle-switch-20a-12v/p/ST0577
https://www.pjrc.com/store/teensy35.html
1 - I use the Arduino IDE which is C++
2 - I generally connect the buttons between a digital input and ground. They come with no headers so you'd need to solder headers on, or some other way of conneting
3 - You can do multiple but each goes on a separate USB port
4 - There are 58 digital pins, but some are on pads on the back which are harder to solder
5 - Learning Developments in NZ (they're based in Morrinsville)
6 - It depends on how your program it
7 - That switch would work, but it's probably overkill
It does take some electronics knowledge, and soldering skill to work with these kind of controllers
they/them
Prodigi - Optimised IT Solutions
WebOps/DevOps, Managed IT, Hosting and Internet/WAN.
You don't need a teensy, an arduino pro micro or ardunio Leonardo clone will do the job fine. If the switches are momentary you can matrix them and get heaps of them connected, and then the arduino has built in keyboard emulation, if you are wanting to use switches that latch then you cant easily matrix them without diodes, and the code will get more complex since you will have to send a key down and up event on each change of the switch position.
Teensy is way faster than you need for this task. You could also use a conventional arduino and do PS/2 on it, but that has often given me issues with stuck keys, but the usb keyboard and mouse emulation built into the Leonardo support has never done that for me except when my code has locked up while sending keypresses.
I've used lots of them - Race car datalogging, hyperaccurate time servers.. Currently using T4.1s.
Agree with the others, Teensy is overkill for this - but the fact they can act as a game controller/HID means they are ideal for a buttonbox.
You also don't need a 1-1 mapping from input pins - you can use a matrix approach. Check this out. https://www.youtube.com/watch?v=Z7Sc4MJ8RPM
Cheers - N
Please note all comments are from my own brain and don't necessarily represent the position or opinions of my employer, previous employers, colleagues, friends or pets.
Cheers, might look at Arduino.
Whats the key difference in the Duinotech Leonardo r3 and the Duinotech UNO r3?
https://www.jaycar.co.nz/duinotech-uno-r3-development-board/p/XC4410
https://www.jaycar.co.nz/duinotech-uno-r3-development-board/p/XC4410
UNO has a separate small USB capable chip between a non USB micro controller and the host. Its hard to reprogram that small one compared to the main one. Many clones are using a generic USB to serial chip so cant be reprogrammed to do anything else. You have to deal with the communications between the 2 chips yourself. I wouldn't ever bother trying that for USB device emulation even tho some people have had good sucess doing it.
Leonardo has one chip, a USB capable microcontroller. In the early days of Arduino, support for it sucked and it is still hard to do some things on it because you have to use the processor sparingly and not do weird loops etc if you want to keep USB communications working properly. If you find examples of other hardware that works on the UNO and older ones, it may not work on the Leonardo.
I prefer the micro pro clones because they're breadboard spacing, and have little screw terminal breakout boards available.
![]() ![]() |