Test program testing ArduIMU Library

Dependencies:   ArduIMULib mbed

Files at this revision

API Documentation at this revision

Comitter:
ifwui
Date:
Mon Mar 24 20:32:29 2014 +0000
Commit message:
Initial Commit

Changed in this revision

ArduIMULib.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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ArduIMULib.lib	Mon Mar 24 20:32:29 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/ifwui/code/ArduIMULib/#d0d40a6fe11c
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Mon Mar 24 20:32:29 2014 +0000
@@ -0,0 +1,19 @@
+#include "mbed.h"
+#include "Arduimu.h"
+#include <sstream>
+
+Serial pc(USBTX, USBRX); // tx, rx
+Arduimu device(p9, p10);  // tx, rx
+
+int main()
+{
+    std::stringstream s;
+    pc.printf("Starting\r\n");
+    while(1) {
+       // device.receive();
+        s << "Got data: (" << device.getRoll() << "," << device.getPitch() << "," << device.getYaw() << ")";
+        pc.printf("%s\r\n",s.str());
+        s.str("");
+        wait(.2);
+    }
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Mon Mar 24 20:32:29 2014 +0000
@@ -0,0 +1,1 @@
+http://world3.dev.mbed.org/users/mbed_official/code/mbed/builds/824293ae5e43
\ No newline at end of file