HEPTA-Sat Training 2022 / Mbed 2 deprecated Lab4-07_detect_magnetism

Dependencies:   HEPTA_EPS HEPTA_SENSOR mbed

Revision:
2:6fdd18473e85
Parent:
0:dd7652191c4d
Child:
3:ffb2234dadb7
diff -r eae8cc169ee6 -r 6fdd18473e85 main.cpp
--- a/main.cpp	Wed Aug 17 07:12:39 2022 +0000
+++ b/main.cpp	Thu Aug 18 12:45:14 2022 +0000
@@ -11,10 +11,11 @@
 int main()
 {
     pc.baud(9600);
-    float ax,ay,az;
+    float mx,my,mz;
+    pc.printf("Magnetometer 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_mag(&mx,&my,&mz);
+        pc.printf("mag : %f,%f,%f\r\n\r\n",mx,my,mz);
         wait(1.0);
     }
 }
\ No newline at end of file