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.
Diff: main.cpp
- Revision:
- 9:687dddda7432
- Parent:
- 6:78538ae01ce6
- Child:
- 11:00c82b2d3c0f
--- a/main.cpp Mon Mar 09 06:05:45 2015 +0000 +++ b/main.cpp Tue Mar 10 12:58:46 2015 +0000 @@ -1,7 +1,7 @@ #include "mbed.h" #define pi 3.141592653589793 -Serial sousin(p9,p10); -Serial hunter(p28,p27); +Serial sousin(p28,p27); +Serial hunter(p9,p10); Serial pc(USBTX,USBRX); Timer em; DigitalOut check (LED1); @@ -92,9 +92,9 @@ }else{ t1 = 0; } - md1 = sin(theta)*0.9+t1; - md2 = sin(theta-pi*2/3)*0.9+t1; - md3 = sin(theta-pi*4/3)*0.9+t1; + md1 = -(sin(theta)*0.9+t1); + md2 = (sin(theta-pi*2/3)*0.9+t1); + md3 = (sin(theta-pi*4/3)*0.9+t1); if (md1 < 0){ *m1 = 2; *mp1 = -md1;