Austin Ward
/
ArduIMUHelloWorld
Test program testing ArduIMU Library
Diff: main.cpp
- Revision:
- 0:ad6a9dab3b2b
diff -r 000000000000 -r ad6a9dab3b2b main.cpp --- /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