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: Encoder HIDScope MODSERIAL QEI mbed
Fork of Inverse_kinematics_PIDController by
Revision 15:6f5b97d006c2, committed 2018-11-02
- Comitter:
- Wimboo
- Date:
- Fri Nov 02 09:38:18 2018 +0000
- Parent:
- 14:a98bc99ea004
- Commit message:
- Heyo C'aspere
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Thu Nov 01 15:51:40 2018 +0000
+++ b/main.cpp Fri Nov 02 09:38:18 2018 +0000
@@ -104,7 +104,7 @@
//correction on x- axis
old_x_correction = x_correction;
x_correction = old_x_correction + (length * cos(old_motor1_angle / C1)- length * cos(motor1_angle/ C1)); // old x + correction
- motor2_angle = ( x_position + x_correction - (length * cos(motor1_angle /C1 ))) / C2;
+ //motor2_angle = ( x_position + x_correction - (length * cos(motor1_angle /C1 ))) / C2;
}
@@ -138,7 +138,7 @@
else if (x_position < 0.0f){
x_position = 0.0f;
}
- motor2_angle =( x_position + x_correction - (length * cos( motor1_angle / C1 ))) /C2 ; // sawtooth-gear motor angle in rad
+ //motor2_angle =( x_position + x_correction - (length * cos( motor1_angle / C1 ))) /C2 ; // sawtooth-gear motor angle in rad
//reset the boolean, for demo purposes
emg2Bool = false;
@@ -223,10 +223,10 @@
void tickermain() {
if(!buttonleft){
- emg0Bool = true;
+ motor2_angle = 4.0f;
}
else if(!buttonright) {
- emg2Bool = true;
+ motor2_angle = 2.0f;
}
xDirection(); //call the function to move in the y direction
yDirection(); //call the function to move in the x direction
