Microbug / MicroBitDAL_SB2_TEST

Fork of MicroBitDALImageRewrite by Joe Finney

Revision:
4:f998ee705a20
Parent:
1:3e0360107f98
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MicroBitMagnetometer.cpp	Fri May 15 22:23:17 2015 +0000
@@ -0,0 +1,26 @@
+#include "inc/MicroBit.h"
+#include "inc/MicroBitMagnetometer.h"
+#include "inc/MicroBitMessageBus.h"
+
+/**
+  * Constructor. 
+  * Create a magnetometer representation with the given ID.
+  * @param id the ID of the new object.
+  * @param address the I2C address of the device.
+  */
+MicroBitMagnetometer::MicroBitMagnetometer(int id, int address)
+{
+    this->id = id;
+    this->address = address;
+}
+
+/**
+  * Gets the current heading of the device, relative to magnetic north.
+  * @return the current heading, in degrees.
+  */
+int MicroBitMagnetometer::heading()
+{
+    return 0;
+}
+
+