Driver to get ranging data from Decawave DW1000 modules connected to Arduino
Decawave DW1000 modules (http://www.decawave.com/products/dwm1000-module) are Ultra-Wide-Band devices that can be used for communication and ranging. Especially, using 3 modules as anchors can provide data for a localization system based on trilateration. The DW1000 is using a SPI connection, but an arduino-compatible board can be used with the library https://github.com/thotro/arduino-dw1000 to hyde the low level drivers and provide direct ranging informations.
Example for airframe file
Add to your firmware section: This example contains all possible configuration options, not all of them are mandatory!
<module name="dw1000_range_arduino">
b'<configure name="DW1000_RANGE_ARDUINO_UART" value="UARTX" />\n '
b'<configure name="DW1000_RANGE_ARDUINO_BAUD" value="B115200" />\n '
</module>
Module configuration options
Configure Options
- name:
DW1000_RANGE_ARDUINO_UART value: UARTX
Description: UART on which arduino and its DW1000 module is connected
- name:
DW1000_RANGE_ARDUINO_BAUD value: B115200
Description: UART Baudrate, default to 115200
Module functions
Init Functions
These initialization functions are called once on startup.
Event Functions
These event functions are called in each cycle of the module event loop.
Files
Header Files
The following headers are automatically included in modules.h
Source Files
Raw dw1000_range_arduino.xml file:
<!DOCTYPE module SYSTEM "module.dtd">
<module name="dw1000_range_arduino" dir="decawave" task="sensors">
<doc>
<description>Driver to get ranging data from Decawave DW1000 modules connected to Arduino
Decawave DW1000 modules (http://www.decawave.com/products/dwm1000-module) are Ultra-Wide-Band devices that can be used for communication and ranging.
Especially, using 3 modules as anchors can provide data for a localization system based on trilateration.
The DW1000 is using a SPI connection, but an arduino-compatible board can be used with the library https://github.com/thotro/arduino-dw1000 to hyde the low level drivers and provide direct ranging informations.
</description>
<configure name="DW1000_RANGE_ARDUINO_UART" value="UARTX" description="UART on which arduino and its DW1000 module is connected"/>
<configure name="DW1000_RANGE_ARDUINO_BAUD" value="B115200" description="UART Baudrate, default to 115200"/>
</doc>
<dep>
<depends>uart</depends>
<provides>ranging</provides>
<suggests>uwb_positioning</suggests>
</dep>
<header>
<file name="dw1000_range_arduino.h"/>
</header>
<init fun="dw1000_range_arduino_init()"/>
<event fun="dw1000_range_arduino_event()"/>
<makefile target="ap">
<configure name="DW1000_RANGE_ARDUINO_UART" case="upper|lower"/>
<configure name="DW1000_RANGE_ARDUINO_BAUD" default="B115200"/>
<define name="USE_$(DW1000_RANGE_ARDUINO_UART_UPPER)"/>
<define name="DW1000_RANGE_ARDUINO_DEV" value="$(DW1000_RANGE_ARDUINO_UART_LOWER)"/>
<define name="$(DW1000_RANGE_ARDUINO_UART_UPPER)_BAUD" value="$(DW1000_RANGE_ARDUINO_BAUD)"/>
<define name="UWB_POSITIONING_TAG_ID" value="0" />
<file name="dw1000_range_arduino.c"/>
<test>
<define name="DW1000_RANGE_ARDUINO_DEV" value="uart3"/>
<define name="USE_UART3"/>
<define name="UWB_POSITIONING_TAG_ID" value="0" />
</test>
</makefile>
</module>