Version : 2014-10-13
This arduino sketch has been developped for my bartop project.
Just few words about my it. It is not yet finished but it is composed mainly by :
- some wood,
- a PC,
- a LCD display,
- buttons and joysticks.
To manage the buttons, it is necessary to have an interface between
buttons/joysticks and the PC in charge of the emulation. There are
different solutions to do that.
- Reusing an existing keyboard. This is cheap but it is difficult to
assign buttons to specific key because the matrix is not so simple,
- The other solution could be to buy a "ready-to-use" interface but I do not like this choice,
- The last one is to make the interface by yourself.
Instead of re-inventing the wheel, I have chosen the Teensy ([Web
site|https://www.pjrc.com/teensy]) as a developpement board. It is
arduino compatible but it manages the USB natively. Because I need to
manage at least 30 different keys, I have decided to add an
input-mutiplexing interface to the Teensy (See IExpender project).
To go back to the sketch, it is very simple. It has been developped
with Arduino 1.0.5 IDE to target a Teensy 2.0. Buttons should be
connected to the interface (IExpender) according to the mapping table
(See code).
Then the interface has to be connected to the Teensy board, and of course the Teensy to the PC
Have fun !
Buzz
Package