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.
Fork of emg2position2angles by
Revision 4:833948d12d78, committed 2015-10-16
- Comitter:
- marijnstudent
- Date:
- Fri Oct 16 10:52:36 2015 +0000
- Parent:
- 3:c1d11616f252
- Child:
- 5:07d15b93b361
- Commit message:
- testfunctie hoeken bepalen als je alleen in x en y wil bewegen.
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Fri Oct 16 10:50:13 2015 +0000
+++ b/main.cpp Fri Oct 16 10:52:36 2015 +0000
@@ -100,6 +100,7 @@
// verzenden van de verstuurde signalen
//scope.send();
+ // xx en yy zijn de gewenste x en y waardes, de hoeken theta 1 en 2 worden berekend
double xx = 7*50*y5;
double yy = 7*50*y5t;
double r = sqrt(pow(xx,2)+pow(yy,2)); // vector naar end effector
@@ -108,6 +109,8 @@
// hoeken berekenen
theta_one = atan2(yy,xx)+beta;
theta_two = pi + alfa;
+
+ // testen van de functie
scope.set(0,xx);
scope.set(1,yy);
double xt = L*cos(theta_one)+L*cos(theta_one+theta_two);
