2015-10-12 (M) Wrist Mounted Chording Keyboard


Wiring still needs to be completed but a program was written to test the wiring before any finishing touches, like a layer of liquid tape, were applied. The program was similar to the testing program because it was a stripped down version which was also a step in modularizing the code so it could be implemented for the wrist servo controller. Code for the test program had remnants, like commented out code, and relied on global variables.

Print statements were used to indicate how many good reads were seen from the receiver versus how many were being tested which won’t be necessary; only a result that the threshold was reached. Global variables are poor modular code because they rely on someone else to create specifically named variables in their code which would be an easy step to miss or do incorrectly. Instead the new code relied on receiving all the data, under any name, through the call to that function.

Modularizing the function resulted in a block of text, two functions actually, which could be copied from one program to the next and used by simply giving it the information it needed and waiting for a result, TRUE or FALSE. This would allow anyone to create a proximity sensor by simply hooking up the correct components and calling the function.
checkObstruction(A, B, C, D);
A – The pin number where the emitter is connected.
B – The pin number where the TSOP4856 is connected.
C – How many good reads are necessary, must be less than D.
D – How many readings to take.
Example, the TSAL6100 (emitter) was connected to pin 3, the TSOP4856 (receiver) was connected to pin 4 and we need to see an 80 percent success rate out of 200 reads. All that would be necessary would be to call
checkObstruction(3, 4, 160, 200);
This would work. If we decided this took too long we could change the last two numbers so the program only ran 50 checks but made sure that 40 of them were good so the 80 percent success rate was the same.
checkObstruction(3, 4, 40, 50);

The RGB LED pins were pulsed to test those connections. Simple analogWrite() calls were made to ramp up their intensity one color at a time.



Testing programs such as the one previously described were not meant to be useful, only show that the hardware was functional. The, supposedly, modularized code was copied into the servo control code. Until the connections to the proximity tester are reestablished the program cannot finish testing.



Downloadable Files:
To do:
  • Wrist mount
    • Terminal board
      • Input voltage
        • USB
    • Make base for keyboard
      • Spacers 
      • Magnet mounts
    • Integrate:
      • Enclosure for each controller
        • Potentiometer access
      • Activation switch
    • Debug 
    • Test
    • Refine
    • Repeat
  • Write instructions
    • Compress and link to all files
      • OpenSCAD files
      • STL models
      • Arduino code 
    • Make diagram with every part labeled 
    • Schematic for servo controller
The rest of the posts for this project have been arranged by date.

First time here?
Completed projects from year 1.
Completed projects from year 2.


Disclaimer for http://24hourengineer.blogspot.com/
This disclaimer must be intact and whole. This disclaimer must be included if a project is distributed.
All information in this blog, or linked by this blog, are not to be taken as advice or solicitation. Anyone attempting to replicate, in whole or in part, is responsible for the outcome and procedure. Any loss of f

functionality, money, property or similar, is the responsibility of those involved in the replication.
All digital communication regarding the email address 24hourengineer@gmail.com becomes the intellectual property of Brian McEvoy. Any information contained within these messages may be distributed or retained at the discretion of Brian McEvoy. Any email sent to this address, or any email account owned by Brian McEvoy, cannot be used to claim property or assets.
Comments to the blog may be utilized or erased at the discretion of the owner. No one posting may claim claim property or assets based on their post.
This blog, including pictures and text, is copyright to Brian McEvoy.
2015-10-11 (Su)

Comments