Simple example DWM3000 Arduino Shield

Hi,

I want to connect the DWM3000 Arduino Shield to an Arduino Board.
I cannot seem to find the library or a code example that will help me successfully connect the board to an Arduino-type board. I am wondering if any one had successfully connected and communicated with Arduino board using the DWM3000 device.
Many thanks
Thomas

To use the DWM3000 with an Arduino board, you will need to install the Arduino library for the DWM3000. You can find the library and instructions for installation on the Decawave website:

https://www.decawave.com/product/dwm3000-module/

Once you have installed the library, you can use the examples provided in the library to communicate with the DWM3000 module.

Here is some sample code that demonstrates how to communicate with the DWM3000 module using the Arduino library:

#include "Decawave.h"

Decawave dw(D2, D3, D4);

void setup() {
  Serial.begin(115200);
  dw.begin();
}

void loop() {
  if (dw.update()) {
    Serial.print("Distance: ");
    Serial.print(dw.getDistance());
    Serial.println(" cm");
  }
  delay(1000);
}

This code initializes the DWM3000 module using the Decawave library, and then reads the distance measurement in centimeters in a loop. You can use the getDistance function to retrieve the distance measurement, and you can use the other functions provided by the library to configure the DWM3000 module and perform other operations.

I hope this helps! Let me know if you have any questions.

Hi, Keonte45 can you send an archive with the library, I can’t find it on the website

@Keonte45: Could you please send us the library or a link where we can download it? Thanks a lot!

As far as I am aware, there is no Library for the DW3000 series chip available to this date. I don’t know where Keontes information is coming from, but I did quite some research on that topic and the only “official” library was made by Makerfabs for their Arduino Shield: GitHub - Makerfabs/Makerfabs-ESP32-UWB-DW3000
Just save the “DW3000” folder in your “libraries” folder of the Arduino IDE and you should be good to go. I didn’t fully pick the library apart yet, but it seems to work quite well with other Arduino versions than the ESP32 used by makerfabs for their own PCB.

Fhilb

IMPORTANT EDIT
It’s been a few months… but I just realized that the DW3000 library I sent in as a link above is a copy of the DW1000 library - All comments refer to the DW1000 manual and most important many reads and writes still refer to old DW1000 register addresses!
In short, the library reads from/ writes to addresses that aren’t even referenced by the new DW3000 and are most likely not doing anything.
Just as an example: in dw3000_port.cpp, the “void enableClock(byte clock)” method writes to the static variable PMSC to register 0x36.
On the DW3000, PMSC is located at 0x11, but its 0x36 on the old DW1000, meaning the write operation has zero effect on literally anything.
Be aware of that when using the library.
(Even better: idle() writes to 0x0D. But it’s not the SYS_CTRL register, it’s the CIA on the new one that is written to)

Kind regards
Fhilb