Austin Ward
/
ArduIMUHelloWorld
Test program testing ArduIMU Library
main.cpp
- Committer:
- ifwui
- Date:
- 2014-03-24
- Revision:
- 0:ad6a9dab3b2b
File content as of revision 0:ad6a9dab3b2b:
#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); } }