Projeto teste do Programa de integracao com biblioteca SGAM_MDW !! Aqui visa um usuario que usa o projeto implementado para a placa NUCLEO F429ZI

Dependencies:   sgam_mdw sgam_mdw_NUCLEOF429ZI_impl Cayenne-LPP

Revision:
7:cabeef41022a
Parent:
3:30744a23fdcb
Child:
10:cb7a807b5225
--- a/main.cpp	Sat Jun 15 14:04:26 2019 +0000
+++ b/main.cpp	Thu Jun 20 12:30:19 2019 -0300
@@ -1,6 +1,42 @@
 #include "mbed_config.h"
 #include "mbed.h"
 
+#include "sgam_mdw.h"
+#include "ControlImpl.h"
+#include "Gyroscope.h"
+
+ControlImpl ctrl;
+
 int main() {
-    return 0;
+    printf("=============== INICIO ===============\r\n");
+
+    Control* control = ctrl.getControler();
+
+    control->initialize();
+    
+    // Sensor<float>* temp = (Sensor<float>*) control->getSensor((char*)"Temperature");
+    
+    // int count = 0;
+    // while( count++ < 10) {
+    //     float* f = temp->getValue();
+    //     printf("Temperatura => %f \r\n", *f);
+    //     wait(1);
+    // }
+
+    Sensor<GyroscopeData>* gyro = (Sensor<GyroscopeData>*) control->getSensor((char*)"Gyroscope");
+    
+    int count = 0;
+    while( count++ < 10) {
+        GyroscopeData* data = gyro->getValue();
+        
+        printf("Gyro (X) => %d \r\n", data->gx);
+        printf("Gyro (Y) => %d \r\n", data->gy);
+        printf("Gyro (Z) => %d \r\n", data->gz);
+        printf("***********************************\r\n");
+
+        wait(1);
+    }
+
+    printf("=============== FINAL ===============\r\n");
+    return 1;
 }