CanSat-C 2021 / Mbed 2 deprecated HMC6352_test

Dependencies:   mbed HMC6352

Files at this revision

API Documentation at this revision

Comitter:
ushiroji
Date:
Sun Oct 24 11:33:44 2021 +0000
Commit message:
test

Changed in this revision

HMC6352.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
diff -r 000000000000 -r 27da40c99bee HMC6352.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/HMC6352.lib	Sun Oct 24 11:33:44 2021 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/aberk/code/HMC6352/#83c0cb554099
diff -r 000000000000 -r 27da40c99bee main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Sun Oct 24 11:33:44 2021 +0000
@@ -0,0 +1,17 @@
+#include "mbed.h"
+#include "HMC6352.h"
+
+HMC6352 compass(D4, D5);
+Serial pc(USBTX, USBRX);
+
+int main() 
+{
+    compass.setOpMode(HMC6352_CONTINUOUS, 1, 20);
+    
+    pc.printf("\r\n\DIGITAL COMPASSS START\r\n");
+    while(1)
+    {
+        wait(1);
+        pc.printf("Heading is: %f\n", compass.sample() / 10);
+    }
+}
\ No newline at end of file
diff -r 000000000000 -r 27da40c99bee mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Sun Oct 24 11:33:44 2021 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400
\ No newline at end of file