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:
9:c8839de428ac
Parent:
8:7a9c61242e2f
Child:
10:d077bb12d259
--- a/main.cpp	Tue Nov 18 15:41:33 2014 +0000
+++ b/main.cpp	Thu Nov 20 16:00:34 2014 +0000
@@ -36,7 +36,7 @@
     wait(1);
     
     dw.callbackRX = &Interrupthandler;
-#ifndef SENDR
+#ifndef SENDER
     uint8_t dataframereadyinterrupt = 0x20; // only good frame would be 0x40
     dw.writeRegister(DW1000_SYS_MASK, 1, &dataframereadyinterrupt, 1);
     
@@ -53,10 +53,14 @@
         sprintf((char*)message, "HELLO WORLD! %d", i);
         dw.sendFrame(message, 20);
         
-        uint8_t messagecheck[20] = "HELLO WORLD!";
+        uint8_t messagecheck[20];
         dw.readRegister(DW1000_TX_BUFFER, 0, messagecheck, 20);
-        pc.printf("Message in buffer: %s\r\n", messagecheck);
-        wait(2);
+        pc.printf("Message in buffer: %s\r\nSending...\r\n", messagecheck);
+        /*for(int i=0; i<10; i++) {                                 // to control Voltage
+            pc.printf("%d Voltage: %f\r\n", i, dw.getVoltage());
+            wait(0.2);
+        }*/
+        wait(0.1);
 #else
         pc.printf("%d Waiting...\r\n", i);
         wait(5);