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.
Dependents: roboticLab_withclass_3_July
Fork of ISR_Mini-explorer by
Revision 3:b996cbe5dabd, committed 2017-07-12
- Comitter:
- Ludwigfr
- Date:
- Wed Jul 12 18:08:02 2017 +0000
- Parent:
- 2:92ca9a6a1d4e
- Commit message:
- test;
Changed in this revision
| robot.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/robot.h Tue Jul 11 16:54:58 2017 +0000
+++ b/robot.h Wed Jul 12 18:08:02 2017 +0000
@@ -51,9 +51,6 @@
int IRobot=0;
int JRobot=0;
-float D_cm=0;
-float L_cm=0;
-
//SAIDAS DIGITAIS (normal)
DigitalOut q_pha_mot_rig (PTE4,0); //Phase Motor Right
DigitalOut q_sleep_mot_rig (PTE3,0); //Nano Sleep Motor Right
@@ -1016,11 +1013,12 @@
ticks2d=ticks1d;
ticks2e=ticks1e;
- D_cm= (float)D_ticks*((3.25*3.1415)/4096);
- L_cm= (float)E_ticks*((3.25*3.1415)/4096);
+ float D_cm= (float)D_ticks*((3.25*3.1415)/4096);
+ float L_cm= (float)E_ticks*((3.25*3.1415)/4096);
//pc.printf("\r\nD_cm:%f",D_cm);
//pc.printf("\r\nL_cm:%f",L_cm);
float CM=(D_cm + L_cm)/2;
+
//pc.printf("\r\nCM:%f",CM);
theta +=(D_cm - L_cm)/7.18;
theta = atan2(sin(theta), cos(theta));
