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 MODSERIAL mbed
Fork of Begintotaalscript by
Revision 4:c79922420b70, committed 2013-11-05
- Comitter:
- gerjan
- Date:
- Tue Nov 05 09:30:32 2013 +0000
- Parent:
- 3:a3e4580af271
- Child:
- 5:4adfd729a291
- Commit message:
- voor esthers telefoontje;
Changed in this revision
| begintotaalscript.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/begintotaalscript.cpp Tue Nov 05 08:42:42 2013 +0000
+++ b/begintotaalscript.cpp Tue Nov 05 09:30:32 2013 +0000
@@ -107,10 +107,10 @@
ybegin=0; //beginpositie
qbegin=5.50; //beginhoek (in rad) vanaf de y-as, rechtsom gedraaid is positief
MaxsnelheidV=150.0; //in mm/s
- MaxsnelheidD=0.26; //in rad/s
+ MaxsnelheidD=0.5*pi; //in rad/s eerst 0.26 rad/s (15 deg/sec)
//constanten regelaar
kp_r = 0.006;
- ki_r = 0.005;
+ ki_r = 0.005;
Ticker looptimer;
looptimer.attach(setlooptimerflag,Ts);
@@ -387,7 +387,7 @@
ybegin=y; // y zal ybgin worden in de volgende loop oftewel:(y(n) will be y(n-1) on next loop)
qbegin=q; // q zal qbegin worden in de volgende loop oftewel:(q(n) will be q(n-1) on next loop)
- pc.printf("bV=%f, bD=%f, sV=%f, sD=%f, x=%f, y=%f, hoek=%f\n",BereikV,BereikD,SnelheidV,SnelheidD,x,y,(d*57.3));
+ pc.printf("bV=%f, bD=%f, sV=%f, sD=%f, x=%f, y=%f, hoek=%f\n",BereikV,BereikD,SnelheidV,SnelheidD,x,y,(q*57.3));
// motoren
@@ -467,7 +467,7 @@
// terug naar state 1 knop
if (knop3 == false ) { // terug naar state 1
state=1;
-
+ meting=false;
wait(0.05);
while(knop3 == false) {}
