Sim racing button box

Not open for further replies.

Sergio Azevedo

New member
I wonder if you can help me...
I've trying to create a button box for sim racing, but i've encountered some limitations with an arduino board.
I've done a 5*5 matrix which operates really good but that's a COM PORT, and games cannot receive that info. i've spent the money in all "small" components, and now i've everything in a shelf.
I'm a economics/management guy with zero knowledge of electronics/programing.

Does Teensy works with simracing games? like rFactor/rFactor2/iRacing/AssettoCorsa/etc?

For a 25 (up to 32) button box, which teensy board do you recomend?

Thanks everyone!!
So you're saying that an arduino Leonardo would do the job?
What's the difference for an arduino Nano (what i've got)?

sorry about talking about this over here...
Teensy (and Leonardo) can work as a native USB device. Regular Arduino Uno can't. It's always only a serial device.

I would disagree on the recommendation to use Arduino Leonardo over Teensy. Leonardo only supports Serial, Keyboard and Mouse, using the official software from Arduino. It's possible to hack it to act as a Joystick or Gamepad, which most games need. Most of those hacks involve someone who's copied Teensy's code for USB Joystick.

With Teensy, USB Joystick mode is officially supported. You'll almost certainly want to use that if you're controlling a racing simulator or game.

Does Teensy works with simracing games? like rFactor/rFactor2/iRacing/AssettoCorsa/etc?

It should, but of course I don't have any of those programs. As you can see on the screenshots on that joystick page, Teensy appears to Windows as a regular USB joystick with 32 buttons. Virtually all programs that recognize normal joysticks will see Teensy as if it's simply another joystick connected to your computer.

For a 25 (up to 32) button box, which teensy board do you recomend?

Teensy++ 2.0 would be simpler, since it has enough pins to simply connect a button to each pin. For a smaller board, you'd need to use somthing like the Keypad library.
Paul, although both the Leonardo and Teensy can work as USB devices the step towards Teensy 3 is higher than Leonardo. I work as a teacher in computer science education so have quite some experience with that. I do not have experience with the Teensy++ 2.0 but if one has an economics / management background I don't assume one has a lot of soldering skills and for most novices putting breadboard wires in a normal Arduino is already challenging enough (I can really tell the difference between technical computer science students and business and economics with computer sciences (two different tracks) for that matter).
To play devil's advocate to jakorten... I was never really able to bite into the actual arduinos. They never quite did what I wanted them to do, which made it much more complicated to try and force them to do things that didn't already have large, well defined tutorials and code bases.

I only really got into hardware/programming once I picked up a Teensy++ 2.0, entirely because it made USB MIDI extremely easy. Soldering is a skill that can be trained with scraps, and Teensy's fit much more nicely into breadboards than Arduinos do. Trying to get a Leonardo to act like a joystick - which I haven't personally tried - seems like it'd be much more of a learning curve than soldering and basic circuit layout.

Arduinos always felt like learning tools to me, while the Teensy line feels like something you can actually make useful and complex devices with, relatively painlessly. (Now, i know there's counterarguments to this - my 3D printer runs on what is essentially a tricked out Arduino Mega - but it's still essentially just running Serial, not a custom (and class compliant!) USB type)
Well it depends on personal skills of course, what I was saying was backed by general observation over a general population of students. Last year I needed to lecture introduction to embedded systems for economics oriented cs students and my colleague had the supposedly more tech group, for some reason my students were more affluent than his (and he is a very good teacher so that wasn't it). Those were both part-time students and their boss wanted them to follow courses in either the business oriented or the software oriented programme and so their own skills were different from there course profile apparently.

Teensy is a very nice product, but the Teensy 3 has a drawback and that is installing extra software and learning the quirks when uploading fails to actually get the thing to work in the end (doesn't happen too often to me, but now and then and that is even more problematic for novices I think). Apart from that I totally love the Teensy and Paul's work although I would not recommend my colleagues to switch from UNO to Teensy for all students (although for the more affluent students I already suggest them to get Teensies instead of normal Arduino's and in fact for a large research project we only use Teensies (and probably one edison per system).
I always recommend Teensy over Arduino. I have found it to be so much better from a capability perspective and I think Paul's software contributions would be impossible to overstate. They are magnificent.
From a capability perspective and software contributions by Paul and other Teensy enthousiasts from this forum (like noxx) I would totally agree. Sergio did not mention here he already did use a small form factor Arduino (Nano), so that makes Teensy probably the best choice. But jwmelvin, for technical people it is always a challenge to understand that one's own preferences aren't always the best option for others, especially for 'less able peers'. I try to always remember that as a teacher but now and then also fall short on this.
Arduino Uno certainly is very easy to use for projects where all your hardware needs can be met by plugging ready-made shields together. Often the shields are spendy, but from an ease of use point of view, not having to build any hardware makes some types of projects really easy.

As soon as you have to build stuff yourself, using a solderless breadboard, I think it's really debate whether dangling wires from the Arduino Uno sockets is a good approach. Boards like Arduino Nano and Teensy are designed to work directly with breadboards. If you buy it with the pins already soldered, it just plugs right in.

When you're developing curriculum for entry level students, you can generally plan around the feature set of almost any board. If you use Uno, then you're going to design lessons that fit into the 14 digital and 6 analog I/O pins and USB Serial communication. When the ultimate goal is beginner-level learning, technical requirements aren't a huge deal. You can design the lesson goals to fit whatever hardware you've selected.

But for a specific project with real-world goals, like making custom controls for racing games / simulators involving 32 buttons, the project can be made much easier by choosing the right tool for the job. It's commonly said "when the only tool you have is a hammer, everything looks like a nail". Arduino Uno is indeed a great product. Many people are very familiar with it. But just becanse it's familiar and easy doesn't mean it's always suitable. Uno does not support USB Joystick communication. Neither does Leonardo. Neither of those boards has enough digital I/O pin to connect 32 buttons in a simple one-per-pin way. Shoehorning them into such a project is at least challenging and can be quite difficult.

Having to install extra software and use an unfamiliar board might seem like a hurdle. But if the ultimate goal involves controlling existing PC software that responds to joysticks, and involves wiring up a large number of signals, I'm confident the small extra effort to install Teensyduino and use the less-familiar Teensy++ 2.0 board will be well worthwhile. Being able to just choose Joystick protocol in the Tools > USB Type menu, and send joystick events with simple functions (while also having the Arduino Serial Monitor able to show Serial.print info), and connect buttons to each pin and easily read state changes with the Bounce library will make such a project dramatically easier.

For real projects with specific goals, it really is worthwhile to choose the right tool for the job.
Last edited:
Two random thoughts, one is the google term if you are looking for projects like this to steal from/emulate is a 'simpit', the second is that making your teensy pretend it's a zero axis joystick with lots of buttons may be the best way assuming your game will accept it. While keyboard can be simpler joystick emulation has the key advantage that a failure mode isn't random keypresses into your code editor, emails or other places you don't want typing to happen.

If you do go the keyboard route avoid programing it to emit things like 'delete' 'enter' or 'tab' to reduce the excitement potential.
Not open for further replies.