This is the DW1000 driver and our self developed distance measurement application based on it. We do this as a semester thesis at ETH Zürich under the Automatic Control Laboratory in the Department of electrical engineering.

Dependencies:   mbed

Revision:
6:d5864a1b9e17
Parent:
5:111f11c95d27
Child:
7:e634eeafc4d2
--- a/main.cpp	Tue Nov 18 13:35:48 2014 +0000
+++ b/main.cpp	Tue Nov 18 13:39:50 2014 +0000
@@ -12,6 +12,10 @@
 
 //#define SENDER
 
+void Interrupthandler() {
+    pc.printf("Interrupt!!!!!!!!!!!!!!!!!!!!!!!!\r\n");
+}
+
 int main() {
     int i=0;
     pc.printf("DecaWave 0.1\r\nup and running!\r\n");
@@ -31,11 +35,8 @@
 #ifndef SENDR
     uint8_t dataframereadyinterrupt = 0x20; // only good frame would be 0x40
     dw.writeRegister(DW1000_SYS_MASK, 1, &dataframereadyinterrupt, 1);
-    DigitalIn button(USER_BUTTON);
-    while(1) {
-        pc.printf("Status: %X\r\n", (int)button);
-        wait(0.1);
-    }
+    InterruptIn button(USER_BUTTON);
+    button.rise(&Interrupthandler);
 #endif
     
     while(1) {