Class Pct2075
Represents a PCT2075 temperature sensor
Assembly: Pct2075.dll
View Source
public class Pct2075 : PollingSensorBase<Temperature>, IObservable<IChangeResult<Temperature>>, ITemperatureSensor, ISamplingSensor<Temperature>, ISensor<Temperature>, ISensor, ISamplingSensor, II2cPeripheral
Inheritance: System.Object
-> Meadow.Foundation.ObservableBase<UNIT>
Implements:
System.IObservable<Meadow.IChangeResult<Meadow.Units.Temperature>>
, Meadow.Peripherals.Sensors.ITemperatureSensor
, Meadow.Peripherals.Sensors.ISamplingSensor<Meadow.Units.Temperature>
, Meadow.Peripherals.Sensors.ISensor<Meadow.Units.Temperature>
, Meadow.Peripherals.Sensors.ISensor
, Meadow.Peripherals.Sensors.ISamplingSensor
, Meadow.Hardware.II2cPeripheral
Properties
Temperature
Last value read from the Temperature sensor.
View Source
public Temperature? Temperature { get; }
DefaultI2cAddress
The default I2C address for the peripheral
View Source
public byte DefaultI2cAddress { get; }
Methods
ReadSensor()
Read value from sensor
View Source
protected override Task<Temperature> ReadSensor()
Returns
System.Threading.Tasks.Task<Meadow.Units.Temperature>
: unitized value### SetInterruptTemperatures(Temperature, Temperature, bool)
Sets the interrupt temperatures for the PCT2075 sensor.
View Source
public void SetInterruptTemperatures(Temperature interruptOnTemperature, Temperature interruptOffTemperature, bool interruptActiveHigh = true)
Parameters
Type | Name | Description |
---|---|---|
Meadow.Units.Temperature | interruptOnTemperature | The temperature threshold that triggers the interrupt. |
Meadow.Units.Temperature | interruptOffTemperature | The temperature threshold that deactivates the interrupt. |
System.Boolean | interruptActiveHigh | Indicates whether the interrupt is active-high (true) or active-low (false). |
Default is active-high. |
Implements
System.IObservable<Meadow.IChangeResult<Meadow.Units.Temperature>>
Meadow.Peripherals.Sensors.ITemperatureSensor
Meadow.Peripherals.Sensors.ISamplingSensor<Meadow.Units.Temperature>
Meadow.Peripherals.Sensors.ISensor<Meadow.Units.Temperature>
Meadow.Peripherals.Sensors.ISensor
Meadow.Peripherals.Sensors.ISamplingSensor
Meadow.Hardware.II2cPeripheral