Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of dgps by
Diff: handle/handleCompass.cpp
- Revision:
- 17:323fc40376d5
diff -r 28b866df62cf -r 323fc40376d5 handle/handleCompass.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/handle/handleCompass.cpp Thu Apr 03 17:18:58 2014 +0000
@@ -0,0 +1,16 @@
+#include "handleCompass.h"
+
+compassHandle::compassHandle(){
+ heading = 0;
+ setup();
+}
+
+compassHandle::setup(){
+ compass.init();
+ compass.enableDefault();
+}
+
+compassHandle::run(){
+ compass.read();
+ heading = compass.get_heading();
+}
\ No newline at end of file
