Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.


kiwis

832 posts

Ultimate Geek


#283876 16-Mar-2021 22:37
Send private message

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? 


Create new topic
danfaulknor
933 posts

Ultimate Geek

Trusted
Prodigi

  #2675887 17-Mar-2021 00:40
Send private message

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.




kiwis

832 posts

Ultimate Geek


  #2675993 17-Mar-2021 10:26
Send private message

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

 

 


danfaulknor
933 posts

Ultimate Geek

Trusted
Prodigi

  #2676133 17-Mar-2021 15:26
Send private message

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.




richms
28168 posts

Uber Geek

Trusted
Lifetime subscriber

  #2676191 17-Mar-2021 16:38
Send private message

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.





Richard rich.ms

  #2676207 17-Mar-2021 16:56
Send private message

The earliest implementation of iCloud was for Macbooks, not iPhones, the earliest iCloud cracker was built on Teensy.

The lock was feeble security - a 4-digit PIN code, so a maximum key space of 10,000 possibilities. A well-trained monkey could do it, although I guess you'd have to wipe monkey spit off afterwards.

The legit email recovery method wasn't robust either, so occasionally you'd need a keyboard / mouse simulator to get people back into their MacBooks. 73 lines of code on a Teensy 3.1 was all it took, which included a loop to regularly restart to avoid the MacBook wanting longer & longer breaks in between keyboard entries. This wasn't a high-speed brute force, if the forgotten code was 9XXX it'd take up to 3 days.

#include usb_keyboard.h
#include usb_mouse.h

Talkiet
4792 posts

Uber Geek

Trusted

  #2676237 17-Mar-2021 17:26
Send private message

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.


kiwis

832 posts

Ultimate Geek


  #2676294 17-Mar-2021 21:55
Send private message

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

 

 


 
 
 

Cloud spending continues to surge globally, but most organisations haven’t made the changes necessary to maximise the value and cost-efficiency benefits of their cloud investments. Download the whitepaper From Overspend to Advantage now.
richms
28168 posts

Uber Geek

Trusted
Lifetime subscriber

  #2676861 19-Mar-2021 09:00
Send private message

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.

 

 





Richard rich.ms

Create new topic





News and reviews »

Air New Zealand Starts AI adoption with OpenAI
Posted 24-Jul-2025 16:00


eero Pro 7 Review
Posted 23-Jul-2025 12:07


BeeStation Plus Review
Posted 21-Jul-2025 14:21


eero Unveils New Wi-Fi 7 Products in New Zealand
Posted 21-Jul-2025 00:01


WiZ Introduces HDMI Sync Box and other Light Devices
Posted 20-Jul-2025 17:32


RedShield Enhances DDoS and Bot Attack Protection
Posted 20-Jul-2025 17:26


Seagate Ships 30TB Drives
Posted 17-Jul-2025 11:24


Oclean AirPump A10 Water Flosser Review
Posted 13-Jul-2025 11:05


Samsung Galaxy Z Fold7: Raising the Bar for Smartphones
Posted 10-Jul-2025 02:01


Samsung Galaxy Z Flip7 Brings New Edge-To-Edge FlexWindow
Posted 10-Jul-2025 02:01


Epson Launches New AM-C550Z WorkForce Enterprise printer
Posted 9-Jul-2025 18:22


Samsung Releases Smart Monitor M9
Posted 9-Jul-2025 17:46


Nearly Half of Older Kiwis Still Write their Passwords on Paper
Posted 9-Jul-2025 08:42


D-Link 4G+ Cat6 Wi-Fi 6 DWR-933M Mobile Hotspot Review
Posted 1-Jul-2025 11:34


Oppo A5 Series Launches With New Levels of Durability
Posted 30-Jun-2025 10:15









Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.



Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.