Detailed Design

Version 4 (J. Simmons, 09/10/2013 11:38 am)

1 2 J. Simmons
h1. v0.2 Detailed Design
2 1 J. Simmons
3 3 J. Simmons
{{toc}}
4 3 J. Simmons
5 2 J. Simmons
The v0.2 design is based on the answer to Q4 of the [[Initial Questions]].  The "Fritzing drawing":https://opendesignengine.net/dmsf_files/255?download=287 shown below covers the prototype design.  The remainder of this document covers the design decisions by addressing each of the requirements.
6 2 J. Simmons
7 2 J. Simmons
!https://opendesignengine.net/dmsf_files/254?download=288!
8 1 J. Simmons
9 3 J. Simmons
h2. R1: Detect movement on the exercise equipment and send walking command to video game (typically by "pressing" the 'w' key)
10 1 J. Simmons
11 3 J. Simmons
To send key presses, the v0.2 *holoseat* controller replaces the Arduino Uno + USB Keyboard Controller from v0.1 with an Arduino Leonardo, using the Leonardo's built-in "keyboard emulation":http://arduino.cc/en/Tutorial/KeyboardMessage.
12 1 J. Simmons
13 3 J. Simmons
To sense activity on the exercise equipment, the *holoseat* will continue to use a reed switch.  For v0.2, the reed switch used will be a "Radioshack 55050593":http://www.radioshack.com/product/index.jsp?productId=12706328 as with the "Arduino Bike Speedometer":http://www.instructables.com/id/Arduino-Bike-Speedometer/
14 3 J. Simmons
15 3 J. Simmons
h2. R2: Suppress the walk command signal
16 3 J. Simmons
17 3 J. Simmons
To suppress the walk command signal, a toggle switch will be added with the closed position indicating the walk command should be sent and the open position indicating the walk command should not be sent.  The toggle switch used will be a "Radioshack #275-645":http://www.radioshack.com/product/index.jsp?productId=2062509  as with the "Arduino Bike Speedometer":http://www.instructables.com/id/Arduino-Bike-Speedometer/.  See the "push button tutorial":http://arduino.cc/en/tutorial/button for an example of reading a switch/button in the source code.
18 3 J. Simmons
19 3 J. Simmons
h2. R3: Show the status of the walk command signal
20 3 J. Simmons
21 3 J. Simmons
The status of the walk command will be indicated with an LED.  The LED will be lit when the walk command is active, and unlit when the walk command is not active.  See the "LED tutorial":http://arduino.cc/en/Tutorial/Blink?from=Tutorial.BlinkingLED for an example of lighting an LED.
22 4 J. Simmons
23 4 J. Simmons
h2. R4: Support single step vs continuous walking
24 4 J. Simmons
25 4 J. Simmons
Supporting single step will be implemented completely in source code.  The current plan is to have different behavior during the reed switch interrupt handler if the RPM is 0 (which should trigger a single key press) vs when the RPM is non-zero (which should work like the vs 0.1 *holoseat*).
26 4 J. Simmons
27 4 J. Simmons
h2. R5: Tune the "walking" speed required to trigger sending the walk command
28 4 J. Simmons
29 4 J. Simmons
The walking speed (that is the RPM value required to trigger a key press be sent to the computer) will be tuned with a slide style potentiometer.  The mid-way point on the slider will indicate the user wishes to use the default walking speed.  Lower values on the slider will reduce the walking speed down to a minimum of 50% of the default.  Higher values on the slider will increase the walking speed up to a maximum of 200% of the default.  See the "Potentiometer Tutorial":http://www.arduino.cc/en/Tutorial/Potentiometer for an example of reading values from a potentiometer.