pub struct SensorStatus(pub u8);
Expand description

SensorStatus is the response from the sensor indicating if it is ready to read from, and if it is calibrated.

This is returned from the check_status method. It is used both during initialization, which is when the sensor caibrates itself, and during measure. During measure the sensor will report itself as busy (not ready) for a period of 80ms.

Tuple Fields

0: u8

Implementations

Create a new SensorStatus from an AHT20 status byte.

That byte comes from the check_status method.

Check if the sensor is ready to have data read from it. After issuing a sensor read, you must check is_ready before reading the result. The measure function takes care of this wait and check.

Check if the sensor is calibrated. If it is not, you must call init to initialize the sensor.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.