
ESP32 UWB Tag and Anchor Ranging Example
Basic UWB ranging example for Makerfabs ESP32 UWB boards. One module acts as an anchor, another as a tag, measuring point-to-point distance using DW1000 Two-Way Ranging with ~20 cm accuracy.
Overview
This is the foundational example from the official Makerfabs ESP32 UWB repository. It implements basic Two-Way Ranging (TWR) between an anchor and a tag module using the DW1000 UWB transceiver. The anchor remains stationary as a reference point while the tag measures its distance to the anchor.
How It Works
- Flash one ESP32 UWB module with the anchor firmware
- Flash another with the tag firmware
- The tag continuously measures distance to the anchor using DW1000 TWR
- Distance values are output over serial (and displayed on OLED if using the Pro with Display variant)
Performance
- Range: approximately 130 meters line-of-sight
- Accuracy: ±20 cm
- Works through walls and around obstacles (with reduced range)
Hardware Required
- 2x Makerfabs ESP32 UWB, ESP32 UWB Pro, or ESP32 UWB Pro with Display
- USB cables for programming and serial monitoring
- Uses the modified Makerfabs DW1000 library (included in the repo)
Source
From the official Makerfabs-ESP32-UWB repository, example/tag and example/anchor folders.






