DMU02 Dynamics Measurement Unit
Dynamics Measurement Unit
Hello World
Import programDMUTest
Simple test application for DMU Library
Library
Import librarySiliconSensingDMU
A library for Silicon Sensing DMU02
Datasheet
http://www.siliconsensing.com/media/30703/DocNo-DMU02-00-0100-110-Rev-3PDF.pdfNotes
Silicon Sensing Dynamics Measurement Unit
A driver library for controlling the DMU02 by Silicon Sensing.
| Pin number | DMU pins | mbed pins |
|---|---|---|
| 1 | Supply Positive | 5V |
| 2 | MOSI | P11 |
| 3 | MISO | P12 |
| 4 | CLK | P13 |
| 5 | GND | 0V |
| 6 | S0 | p8 |
| 7 | S1 | P9 |
| 8 | S2 | P10 |
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 }
DMU Library
Import library
Public Member Functions |
|
| DMU (PinName MOSI, PinName MISO, PinName SCLK, PinName S0, PinName S1, PinName S2) | |
|
Creates a
DMU
interface for using regular mbed pins.
|
|
| float | acceleration (char axis) |
|
Return the acceleration in the direction of the selected axis.
|
|
| float | roll () |
|
Return the roll.
|
|
| float | pitch () |
|
Return the pitch.
|
|
| float | yaw () |
|
Return the yaw.
|
|
| void | test () |
|
forces the device to perform the built-in test
|
|
The datasheet for this part can be found here.
You need to log in to post a discussion
Discussion topics
| Topic | Replies | Last post |
|---|---|---|
| dmu02, SiliconSensingDMU DMU02 minimum repetition rate | 1 |
21 Nov 2014
by
|
