Leon Anavi
IT Tips && Tricks

Mobile & Embedded

Created: 24.01.2026 06:28 Last Modified: 24.01.2026 06:36 Views: 10
Keywords: BMP280, I2C, Meshtastic, Telemetry, Wio-SX1262, XIAO Meshtastic Kit, XIAO nRF52840

Adding I2C Sensors and Enabling Telemetry on Meshtastic Nodes with XIAO nRF52840 and Wio-SX1262

Meshtastic is an open source, decentralized communication network built on LoRa technology. In my previous video and blog post, I set up two Meshtastic nodes using the XIAO nRF52840 and the Wio-SX1262 kit. In my newer video, I upgrade those nodes by adding I2C sensor support using the Meshtastic Telemetry Module.

The Telemetry Module allows nodes to report device metrics such as battery level, voltage, airtime, and channel utilization, along with environmental and air quality data. While the default firmware supports the Seeed Studio L76K GNSS module, this setup replaces it with a Bosch BMP280 temperature and barometric pressure sensor connected over I2C.

To enable the BMP280, I built the Meshtastic firmware from source using a custom configuration. Meshtastic supports more than 30 I2C sensors, making it flexible for experimentation. The BMP280 works reliably in this configuration, but it must be connected to D6 for SDA and D7 for SCL rather than the standard hardware I2C pins. In Meshtastic, the sensor runs in forced mode, which is ideal for battery powered devices because it only wakes to take a single measurement before returning to sleep.

Create a Python virtual environment

python3 -m venv ~/meshtastic-env
source ~/meshtastic-env/bin/activate
pip install meshtastic

Optionally install the Meshtastic CLI

pip install meshtastic

Install PlatformIO

pip install --upgrade platformio

Verify the PlatformIO installation

pio --version

Download the Meshtastic firmware source

git clone https://github.com/meshtastic/firmware.git

Enter the firmware directory

cd firmware/

Build the firmware with I2C support for XIAO nRF52840 and Wio-SX1262

pio run -e seeed_xiao_nrf52840_kit_i2c

Enter DFU mode on the XIAO nRF52840

Copy the firmware file to the device

.pio/build/seeed_xiao_nrf52840_kit_i2c/firmware.uf2

In my video, I walk through the whole process, including wiring, firmware build process, and telemetry output to show how easily Meshtastic nodes can be extended with low power environmental sensors.



  Home | About | Contact | Disclaimer | Sitemap © 2009-2022 Leon Anavi. All rights reserved.