Skip to content

This Rust-based application reads sensor data from an I2C bus and publishes the filtered results to an MQTT broker.

License

Notifications You must be signed in to change notification settings

askrejans/sensors-to-mqtt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sensors-to-MQTT

This Rust-based application reads sensor data from an I2C bus and publishes the filtered results to an MQTT broker.

Features

  • I2C sensor data collection (MPU6500 IMU for now only).
  • Real-time publishing to an MQTT broker.
  • Terminal-based data display.

Quick Start

  1. Install Rust and Cargo.
  2. Clone this repository and navigate to its folder.
  3. Adjust config.yaml for your device and broker.
  4. Compile and run:
    cargo build --release
    cargo run

Configuration

  • config.yaml includes sensor bus paths and MQTT settings (host, port, base_topic).

Testing

Unit tests are located alongside the source files. Run:

cargo test

License

Distributed under the MIT License. See LICENSE for more details.

About

This Rust-based application reads sensor data from an I2C bus and publishes the filtered results to an MQTT broker.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages