Skip to main content

Class Pct2075

Represents a PCT2075 temperature sensor

Assembly: Pct2075.dll
View Source
Declaration
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
Declaration
public Temperature? Temperature { get; }

DefaultI2cAddress

The default I2C address for the peripheral

View Source
Declaration
public byte DefaultI2cAddress { get; }

Methods

ReadSensor()

Read value from sensor

View Source
Declaration
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
Declaration
public void SetInterruptTemperatures(Temperature interruptOnTemperature, Temperature interruptOffTemperature, bool interruptActiveHigh = true)
Parameters
TypeNameDescription
Meadow.Units.TemperatureinterruptOnTemperatureThe temperature threshold that triggers the interrupt.
Meadow.Units.TemperatureinterruptOffTemperatureThe temperature threshold that deactivates the interrupt.
System.BooleaninterruptActiveHighIndicates 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