You are viewing an older revision! See the latest version
DMU02
Silicon Sensing Dynamics Measurement Unit¶
A driver library for controlling the DMU02 by Silicon Sensing.
Example Use¶
Import program
00001 #include "mbed.h" 00002 #include "DMU.h" 00003 00004 DMU dmu(p11, p12, p13, p8, p9, p10); 00005 Serial pc(USBTX, USBRX); 00006 00007 00008 int main() { 00009 dmu.test(); 00010 while(1){ 00011 pc.printf("Y accel:%.1f\n",dmu.acceleration('y')); 00012 pc.printf("X accel:%.1f\n",dmu.acceleration('x')); 00013 pc.printf("Z accel:%.1f\n",dmu.acceleration('z')); 00014 pc.printf("Pitch:%.2f\n",dmu.pitch()); 00015 pc.printf("Roll:%.2f\n",dmu.roll()); 00016 pc.printf("Yaw:%.2f\n",dmu.yaw()); 00017 } 00018 }