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:
1:1311e7af0a5c
Parent:
0:f50e671ffff7
Child:
2:16e45ff70baf
--- a/main.cpp	Sun Nov 16 09:53:25 2014 +0000
+++ b/main.cpp	Sun Nov 16 10:04:00 2014 +0000
@@ -27,9 +27,10 @@
         dw.readRegister(DW1000_SYS_CFG, 0, (uint8_t*)&conf, 4);
         pc.printf("%d System Configuration: %X\r\n", i, conf);
         
-# if 1                      // to make one node sender and one receiver
+# if 0                      // to make one node sender and one receiver
         // Send something
         uint8_t message[13] = "HELLO WORLD!";   // fill buffer
+        //sprintf((char*)message, "%d World!!", i);
         dw.writeRegister(DW1000_TX_BUFFER, 0, message, 13);
         uint8_t messagecheck[13];
         dw.readRegister(DW1000_TX_BUFFER, 0, messagecheck, 13);
@@ -38,7 +39,7 @@
         uint16_t framelength = 13;              // put length of frame
         dw.writeRegister(DW1000_TX_FCTRL, 0, (uint8_t*)&framelength, 1);
         
-        if (i == 4) {
+        if ((i % 2) == 0) {
             uint8_t txstart = 0x02;             // trigger sending process
             dw.writeRegister(DW1000_SYS_CTRL, 0, &txstart, 1);
         }