![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Simple test application for DMU Library
Dependencies: SiliconSensingDMU mbed
Diff: main.cpp
- Revision:
- 0:e1fffc72ceff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Mon Mar 11 16:35:57 2013 +0000 @@ -0,0 +1,18 @@ +#include "mbed.h" +#include "DMU.h" + +DMU dmu(p11, p12, p13, p8, p9, p10); +Serial pc(USBTX, USBRX); + + +int main() { + dmu.test(); + while(1){ + pc.printf("Y accel:%.1f\n",dmu.acceleration('y')); + pc.printf("X accel:%.1f\n",dmu.acceleration('x')); + pc.printf("Z accel:%.1f\n",dmu.acceleration('z')); + pc.printf("Pitch:%.2f\n",dmu.pitch()); + pc.printf("Roll:%.2f\n",dmu.roll()); + pc.printf("Yaw:%.2f\n",dmu.yaw()); + } +}