pour bastos

Dependencies:   mbed

Revision:
0:e2ce7aa2a4a4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Wed Apr 06 12:25:35 2022 +0000
@@ -0,0 +1,33 @@
+#include "mbed.h"
+#include "lib.h"
+
+void fct()
+{
+    if(cPosD==0)cPosD=220;
+    else cPosD=0;
+    if(cPosG==0)cPosG=220;
+    else cPosG=0;
+}
+void aff2(){
+    printf("cPosG=%d -- cptG=%d -- cmdG=%d -- cPos=%.2f\n\r",cPosG,cptG,cmdG,cPos);
+    }
+int main()
+{
+    init();
+//tac.attach(&aff2,0.5);
+    while(1) {
+        //printf("erD=%d -- somErD=%d -- cptD=%d -- cmd=%d\n\r",erD,somErD,cptD,cmdD);
+        printf("Go !!\n\r");
+        
+        distance(2000);
+        
+        rotation(180);
+        distance(1000);
+        rotation(360);
+        distance(1000);
+        rotation(-180);
+        
+        wait(2);
+
+    }
+}