Meshtastic is an open-source, decentralized communication network built on LoRa technology, and in my previous video I set up two nodes using the XIAO nRF52840 and Wio-SX1262 Kit; now it’s time to upgrade them with I2C sensors. The Telemetry Module can report device metrics like battery level, voltage, channel utilization, and airtime, along with environmental, air-quality, and even health metrics. While the default firmware for the XIAO nRF52840 and Wio-SX1262 Kit supports the Seeed Studio L76K GNSS module for multi-system satellite tracking, in this video we replace it with a Bosch BMP280 temperature and barometric pressure sensor over I2C. To do this, I downloaded and built the Meshtastic firmware from source using a custom configuration, taking advantage of its support for more than 30 I2C sensors. The BMP280 works perfectly with the setup, though it must be connected to D6 (SDA) and D7 (SCL) instead of the standard hardware I2C pins, and within Meshtastic it operates in forced mode, an energy-efficient setting ideal for battery-powered devices because the sensor wakes only to take a single measurement before returning to sleep.
* Create Python virtual environment:
python3 -m venv ~/meshtastic-envsource ~/meshtastic-env/bin/activatepip install meshtastic
* Optionally, install the Meshtastic CLI app:
pip install meshtastic
* Install PlatformIO:
pip install --upgrade platformio
* Verify that PlatformIO has been successfully installed and check the version:
pio --version
* Download the firmware source code from GitHub:
git clone
https://github.com/meshtastic/firmware.git* Enter the firmware directory:
cd firmware/
* Build Meshtastic Firmware with I2C support for XIAO nRF52840 & Wio-SX1262:
pio run -e seeed_xiao_nrf52840_kit_i2c
* Enter DFU mode on XIAO nRF52840
* Copy .pio/build/seeed_xiao_nrf52840_kit_i2c/firmware.uf2 to your XIAO nRF52840 & Wio-SX1262 kit.
🎥 Related Videos
===
Getting Started with Meshtastic: XIAO nRF52840 & Wio-SX1262 Setup and First Test
https://youtu.be/lOhg--tFEUg?si=8g-44pyJYJE6kJ13🔗 Useful Links
===
https://github.com/meshtastic/firmwareMeshtastic Firmware Build Configurations for XIAO nRF52840 & Wio-SX1262 Kit
https://github.com/meshtastic/firmware/blob/develop/variants/nrf52840/seeed_xiao_nrf52840_kit/platformio.iniMeshtastic Firmware Pin Configurations for XIAO nRF52840 & Wio-SX1262 Kit
https://github.com/meshtastic/firmware/blob/develop/variants/nrf52840/seeed_xiao_nrf52840_kit/variant.hBMP280 in Meshtastic Firmware
https://github.com/meshtastic/firmware/blob/develop/src/modules/Telemetry/Sensor/BMP280Sensor.cppXIAO nRF52840 & Wio-SX1262 Kit
https://wiki.seeedstudio.com/xiao_nrf52840&_wio_SX1262_kit_for_meshtastic/XIAO nRF52840 & Wio-SX1262 Kit for Meshtastic
https://www.seeedstudio.com/XIAO-nRF52840-Wio-SX1262-Kit-for-Meshtastic-p-6400.htmlGetting Started with the Meshtastic Kit: XIAO nRF52840 & Wio-SX1262
https://anavi.org/article/334/📚 Chapters
===
0:00 Intro
1:37 Telemetry Module
3:27 Meshtastic Firmware
9:30 Flashing Firmware
11:08 BMP280
13:50 Demo
15:35 Advantages
16:19 Disadvatages
17:24 Conclusions