Software Source Code

Version 1 (J. Simmons, 08/23/2013 08:40 pm)

1 1 J. Simmons
h1. Software Source Code
2 1 J. Simmons
3 1 J. Simmons
h2. Current Version
4 1 J. Simmons
5 1 J. Simmons
The current version of the *Holoseat* is based on "How to build your own tachometer":http://www.instructables.com/id/Arduino-Based-Optical-Tachometer/ from "Instructables":http://www.instructables.com/.  It runs on an "Arduino Uno":http://arduino.cc/en/Main/arduinoBoardUno
6 1 J. Simmons
7 1 J. Simmons
It uses an interrupt to detect the reed switch events and then increments a counter.  The main loop then determines the RPM and if it is above a given threshold, the Arduino triggers a pin which is wired to a transistor to close a circuit on a USB keyboard which presses the *w* key.  When the RPM drops below the threshold, the pin is untriggered and the *w* key is no longer pressed.
8 1 J. Simmons
9 1 J. Simmons
h2. Next Version
10 1 J. Simmons
11 1 J. Simmons
The next version of the *Holoseat* will run on an "Arduino Leonardo":http://arduino.cc/en/Main/arduinoBoardLeonardo
12 1 J. Simmons
13 1 J. Simmons
The Leonardo can directly emulate a keyboard, eliminating the need for the USB keyboard and the transistor.  Instead, when the RPM passes the given threshold the Arduino will directly send the *w* key signal to the PC.