Introduction Mechanical Design Electrical Design Software Results and Reflections Meet the Team Parts
Software
|
The micoprocessor control of our system was achieved
using an Interactive C program downloaded into our hanyboard. Our Interactive
C program is very simple, but it effectively achieved the desired motor
control. The psuedocode for our system is seen below.
|
|
|
*********************************** INITIALIZE servo1 Do While STOP not pushed If player2=flexed
& player2_switch=on End While DEINITIALIZE servo1 *********************************** |
![]() |
|
To run two servos simultaneously using the handyboard *.icb files were downloaded from the Handyboard web site. The signal from each emg circuit came into the Handyboard as a digital TTL signal. When the Handyboard saw the emg signal go from 0 to 1 (flexion), and the digital input corresponding to the SPST switch also read 1 (to ensure the circuit was activated), the Handyboard actuated the corresponding servo. The servo then moved along a specified path. The Handyboard monitored each players' respective circuits to ensure independent control. Initially we had configured individual processes for
each user (i.e. the If statement for each player was run as a respective
process). These processes were run simultaneously and polling was used
to ensure that user inputs were recognized. The complete code for the Handyboard program is shown below. |
|
|
|
void flexion() { servo_a5_init(1); } /*Checks if a signal above 5V threshold has been revieved
from the EMG sensor &*/ } /*shuts servos off*/ |