| Crates.io | hayasen |
| lib.rs | hayasen |
| version | 0.0.8 |
| created_at | 2025-08-28 17:18:56.093946+00 |
| updated_at | 2025-09-10 06:30:10.406023+00 |
| description | A multi sensor library for Embedded Rust supporting multiple sensors |
| homepage | |
| repository | https://github.com/Vaishnav-Sabari-Girish/Hayasen |
| max_upload_size | |
| id | 1814384 |
| size | 4,118,661 |
⚠️ Warning: Early Development Stage
This library is currently under active development and has not been thoroughly tested. Use in production systems at your own risk. APIs may change without notice.
Hayasen is an Embedded Rust library designed to simplify sensor integration in embedded systems. It provides unified, type-safe interfaces for various sensors with a focus on ease of use and reliability.
MPU9250 - 9-axis Inertial Measurement Unit (accelerometer, gyroscope, temperature, magnetometer) - Work in Progress
MPU6050 - 6-axis Inertial Measurement Unit (accelerometer, gyroscope, temperature)
Click here to check the current progress of the library
Add hayasen to your Cargo.toml:
[dependencies]
hayasen = { version = "*", features = ["mpu9250"] } # For MPU9250 support
use hayasen::prelude::*;
use hayasen::mpu9250_hayasen;
fn main() -> Result<(), Error<YourI2cError>> {
// Setup I2C (platform-specific)
let i2c = setup_i2c();
// Initialize sensor with default configuration
let mut sensor = mpu9250_hayasen::create_default(i2c, 0x68)?;
// Read all sensor data (temp, accel, gyro)
let (temperature, acceleration, angular_velocity) =
mpu9250_hayasen::read_all(&mut sensor)?;
println!("Temperature: {:.2}°C", temperature);
println!("Acceleration: [{:.3}, {:.3}, {:.3}] g",
acceleration[0], acceleration[1], acceleration[2]);
println!("Angular Velocity: [{:.3}, {:.3}, {:.3}] dps",
angular_velocity[0], angular_velocity[1], angular_velocity[2]);
Ok(())
}
mpu9250 - Enables MPU9250 Inertial Measurement Unit support (enabled by default)mpu6050 - Enables MPU6050 Inertial Measurement Unit supporthayasen/
├── src/
│ ├── lib.rs # Main library entry point
│ ├── error.rs # Unified error types
│ ├── functions.rs # Function registry system
│ └── mpu9250.rs # MPU9250 sensor implementation
├── examples/ # Usage examples
└── tests/ # Integration tests
This project is dual-licensed under either:
Found a bug or have a feature request? Please open an issue on GitHub.
Complete MPU9250 implementation and testing
Add comprehensive test suite
Create more usage examples
Add MAX30102 heart rate sensor support
Add CI/CD pipeline
Support for more sensor types
Advanced features
Ecosystem integration
timeline
title Hayasen Development Timeline
section v0.2.x
MPU9250 Completion : Magnetometer<br>Interrupts<br>FIFO
Testing Suite : Unit Tests<br>Integration Tests
section v0.3.x
Examples : Basic Examples<br>Advanced Use Cases
CI/CD : GitHub Actions<br>Auto Documentation
section v0.4.x
MAX30102 Support : Heart Rate<br>SpO2 Monitoring
section v0.5.x
Additional Sensors : BME280<br>HMC5883L
section v1.0.0
Stable API : Production Ready<br>Full Documentation