Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: HIDScope MODSERIAL mbed-dsp mbed
Diff: main.cpp
- Revision:
- 2:083d74325bfb
- Parent:
- 1:c8ad338ba312
- Child:
- 3:3d5ad874add0
--- a/main.cpp Thu Jan 07 12:47:35 2016 +0000 +++ b/main.cpp Fri Jan 08 10:44:48 2016 +0000 @@ -1,11 +1,11 @@ /*Code originally by Jesse Kaiser, s1355783 for control of the 2DOF Planar Table Some variables are also numbered at the end. The numbers stands for the muscle that controls it. -Biceps = 1 = lower right arm -Triceps = 2 = upper right arm -Pectoralis Major = 3 = upper left arm -Deltoid posterior = 4 = lower left arm -The "x" and "y" at the end of variables stand for the X-Spindle or Y-Spindle respectivly. -The code has been revised to work with the new board and also has a secondary way of controlling it +Biceps = 1 = lower right arm(wrist flexors) +Triceps = 2 = upper right arm(wrist extensors) +Pectoralis Major = 3 = upper left arm(wrist flexors) +Deltoid posterior = 4 = lower left arm(wrist extensors) +The "x" and "y" at the end of variables stand for the X-movement or Y-movement respectivly. +The code has been revised to work with the new board and also has a secondary way of controlling it using a joystick */ #include "mbed.h" @@ -338,12 +338,14 @@ Stepy.period(0.000625);//use period change for speed adjustments Stepx.period(0.000625);//frequency of 1600 Hz + +/*//code for controlling the mechanism with a joystick float Left_value = 0.6; float Right_value = 0.9; float Up_value = 0.6; float Down_value = 0.9; -/* -while(1){//code for controlling the mechanism with a joystick + +while(1){ if (X_control.read() < Left_value){ Dirx.write(0); Enablex.write(0);