succes

Dependencies:   microbit

Revision:
0:c15430f1895f
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sample.cpp	Sat Feb 11 15:55:34 2017 +0000
@@ -0,0 +1,18 @@
+#include "sample.h"
+#include "MicroBit.h"
+
+Sample::Sample(float gx, float ay, float az) 
+            : _gx(gx)
+            , _ay(ay)
+            , _az(az) 
+            {}
+   
+double Sample::GyroRate()
+{
+    return -_gx;
+}
+double Sample::AccelerometerAngle()
+{
+    return (atan2(_ay, _az)+pi)*360/pi; // Noise-O-rama
+}
+