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:
27:71178fdb78e1
Parent:
26:a65c6f26c458
Child:
28:a830131560e8
--- a/main.cpp	Thu Nov 27 19:19:35 2014 +0000
+++ b/main.cpp	Fri Nov 28 07:44:36 2014 +0000
@@ -1,14 +1,16 @@
 // by Matthias Grob & Manuel Stalder - ETH Zürich - 2015
 #include "mbed.h"
 #include "PC.h"                                     // Serial Port via USB for debugging with Terminal
-#include "DW1000.h"
+#include "DW1000.h"                                 // our DW1000 device driver
+#include "MMRanging.h"                              // our self developed raning application
 
 //#define RECEIVER
 
 PC          pc(USBTX, USBRX, 921600);               // USB UART Terminal
 DW1000      dw(PA_7, PA_6, PA_5, PB_6, PB_9);       // SPI1 on Nucleo Board (MOSI, MISO, SCLK, CS, IRQ)
+MMRanging   ranging(&dw);                            // Ranging class for getting distances and later positions
 
-const float timeunit = 1/(128*499.2);
+const float timeunit = 1/(128*499.2);               // conversion between LSB of TX and RX timestamps and microseconds
 int i=0;
 char message[1021] = "";
 char messageRX[1021] = "";
@@ -55,7 +57,7 @@
 }
 
 int main() {
-    pc.printf("DecaWave 0.1\r\nup and running!\r\n");  
+    pc.printf("DecaWave 0.2\r\nup and running!\r\n");  
     dw.setEUI(0xFAEDCD01FAEDCD01);                  // basic methods called to check if we have a working SPI connection
     pc.printf("%d DEVICE_ID register: 0x%X\r\n", i, dw.getDeviceID());
     pc.printf("%d EUI register: %016llX\r\n", i, dw.getEUI());