Skip to content
/ mcp9808 Public

Platform agnostic Rust driver for the Microchip MCP9808 temperature sensor.

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

lukwol/mcp9808

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mcp9808

Rust generic driver for MCP9808 temperature sensor.

Features

  • User-Programmable Temperature Alert Output
  • Operating Voltage Range: 2.7V to 5.5V
  • OperatingCurrent: 200μA (typical)
  • ShutdownCurrent: 0.1μA (typical)
  • 2-wire Interface: I2C™/SMBus Compatible
  • Available Packages: 2x3DFN-8, MSOP-8

Accuracy:

  • ±0.25 (typical) from -40°C to +125°C
  • ±0.5°C (maximum) from -20°C to 100°C
  • ±1°C (maximum) from -40°C to +125°C

User-Selectable Measurement Resolution:

  • +0.5°C
  • +0.25°C
  • +0.125°C
  • +0.0625°C

User-Programmable Temperature Limits:

  • Temperature Window Limit
  • Critical Temperature Limit

Example

use embedded_hal::blocking::i2c;
use mcp9808::{
    temperature::{Celsius, TemperatureMeasurement},
    SlaveAddress, MCP9808,
};

let mut mcp9808 = MCP9808::new(i2c, SlaveAddress::Default);
let measurement: TemperatureMeasurement<Celsius> = mcp9808.read_ambient_temperature().unwrap();
assert_eq!(Celsius(-24.063), measurement.temperature);

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

About

Platform agnostic Rust driver for the Microchip MCP9808 temperature sensor.

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Packages

No packages published

Languages