Fabio Faria / Mbed 2 deprecated DEEC_STM32_for_Romi

Dependencies:   mbed

Revision:
4:4b9d96e6c509
Parent:
1:1e85a02fe11a
Child:
5:7fa3a2a2f603
--- a/main.cpp	Thu Feb 21 15:17:09 2019 +0000
+++ b/main.cpp	Mon Mar 04 16:05:02 2019 +0000
@@ -1,11 +1,15 @@
 #include "mbed.h"
 #include "Robot.h"
+#include "Communication.h"
 
 Serial pc(SERIAL_TX, SERIAL_RX);
 
 int main() {
+    pc.baud(115200);
+    init_radio(&pc);
+    
     while(1) {
-        getCountsAndReset(); // Call getCountsAndReset() to read the values of encoders
+        //getCountsAndReset(); // Call getCountsAndReset() to read the values of encoders
                              // and reset them. The values become available on variables
                              // "countsLeft" and "countsRight".
         
@@ -13,7 +17,7 @@
                               // left motor and 50 for the right motor.
         
         pc.printf("Encoders: Left=%d   Right=%d\n", countsLeft, countsRight);
-        
+        send_odometry(1333, 2889, 3.286, 4.23, 54.29);
         wait(0.5); // Delay of 0.5 seconds.
     }
 }
\ No newline at end of file