HEPTA-Sat Training 2022 / Mbed 2 deprecated Lab4-05_detect_angular_velocity

Dependencies:   HEPTA_EPS HEPTA_SENSOR mbed

Revision:
2:754e17dc25a5
Parent:
0:dd7652191c4d
Child:
3:025a6d59cb26
--- a/main.cpp	Wed Aug 17 07:12:39 2022 +0000
+++ b/main.cpp	Thu Aug 18 12:37:32 2022 +0000
@@ -1,7 +1,7 @@
 #include "mbed.h"
 #include "HEPTA_EPS.h"
 #include "HEPTA_SENSOR.h"
- 
+
 Serial pc(USBTX, USBRX);
 HEPTA_EPS eps(p16,p26);
 HEPTA_SENSOR sensor(p17, 
@@ -11,10 +11,11 @@
 int main()
 {
     pc.baud(9600);
-    float ax,ay,az;
+    float gx,gy,gz;
+    pc.printf("Gyro Sensor Mode\r\n");
     for(int i = 0; i<50; i++) {
-        sensor.sen_acc(&ax,&ay,&az);
-        pc.printf("acc : %f,%f,%f\r\n",ax,ay,az);
+        sensor.sen_gyro(&gx,&gy,&gz);
+        pc.printf("gyro: %f,%f,%f\r\n",gx,gy,gz);
         wait(1.0);
     }
 }
\ No newline at end of file