Class Thermistor
Thermistor temperature sensor object
Assembly: Thermistor.dll
View Source
public abstract class Thermistor : PollingSensorBase<Temperature>, IObservable<IChangeResult<Temperature>>, ITemperatureSensor, ISamplingSensor<Temperature>, ISensor<Temperature>, ISensor, ISamplingSensor
Inheritance: System.Object
-> Meadow.Foundation.ObservableBase<UNIT>
Derived:
Meadow.Foundation.Sensors.Temperature.SteinhartHartCalculatedThermistor
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
Properties
AnalogInputPort
The analog input port used to determine output voltage of the voltage divider circuit
View Source
protected IAnalogInputPort AnalogInputPort { get; }
NominalResistance
The nominal resistance of the thermistor (e.g. 10kOhm for a 10k thermistor)
View Source
public abstract Resistance NominalResistance { get; }
NominalTemperature
The nominal temperature for the nominal resistance, typically 25C
View Source
public virtual Temperature NominalTemperature { get; }
Temperature
The temperature from the last reading
View Source
public Temperature? Temperature { get; }
Methods
StartUpdating(TimeSpan?)
Starts updating the sensor on the updateInterval frequency specified.
This method also starts raising Updated
events and notifying
IObservable subscribers. Use the updateInterval
parameter
to specify how often events and notifications are raised/sent.
View Source
public override void StartUpdating(TimeSpan? updateInterval = null)
Parameters
Type | Name | Description |
---|---|---|
System.Nullable<System.TimeSpan> | updateInterval | A TimeSpan that specifies how long to |
wait between readings. This value influences how often `*Updated`
events are raised and `IObservable` consumers are notified.
The default is 5 seconds. |
StopUpdating()
Stops sampling the sensor
View Source
public override void StopUpdating()
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