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: Motor QEI mbed mbedWSEsbc
Fork of ES309_NerfTurret by
Revision 3:4dcf81584894, committed 2016-05-12
- Comitter:
- caleblegis
- Date:
- Thu May 12 13:16:33 2016 +0000
- Parent:
- 2:b8a033375c27
- Commit message:
- h
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r b8a033375c27 -r 4dcf81584894 main.cpp
--- a/main.cpp Thu May 12 12:51:37 2016 +0000
+++ b/main.cpp Thu May 12 13:16:33 2016 +0000
@@ -77,17 +77,17 @@
// Control algorithm
DC = (0.9841*old_DC) + (0.2348*E) - (0.2335*old_E);
old_E = E;
- m.speed(DC+0.15);
+ // m.speed(DC+0.15);
old_DC = DC;
if(DC>0 && DC<0.7)
- m.speed(DC+0.1);
- if(E>-1.0)
+ m.speed(DC+0.4);
+ if(E<-1.0)
m.speed(DC+0.15);
if (E<0.015 && E>-0.01)
m.speed(0.0);
else if(DC<0 && DC>-0.7) {
- m.speed(DC-0.34);
+ m.speed(DC-0.8);
if(E>-1.0)
m.speed(DC-0.5);
if (E>-0.015&& E<0.01)
