[][src]Crate tsic

Allows to read the current temperature from the TSIC 306

Note that most of this code is ported and heavily modified from C to rust using the code found in arduino-tsic and other places scattered throughout the internet that used the sensor from C.

Please also refer to the Data Sheet for implementation details.

Usage

This example is not tested
use tsic::Tsic;

let sensor = Tsic::new(/* your hal pin */);

let mut delay = /* your hal delay */();

match sensor.read(&mut delay) {
  Ok(t) => defmt::info!("Temp is: {:f32}", t.as_celsius()),
  Err(e) => defmt::warn!("Getting sensor data failed: {:?}", e),
};

Structs

Temperature

Represents a single temperature reading from the TSIC 306 sensor.

Tsic

The Tsic struct is the main entry point when trying to get a temperature reading from a TSIC 306 sensor.

Enums

TsicReadError

Contains all errors that can happen during a reading from the sensor.