Skip to main content

Class Thermistor

Thermistor temperature sensor object

Assembly: Thermistor.dll
View Source
public abstract class Thermistor : SamplingSensorBase<Temperature>, IObservable<IChangeResult<Temperature>>, ITemperatureSensor, ISamplingSensor<Temperature>, ISensor<Temperature>, ISensor, ISamplingSensor

Inheritance: System.Object -> Meadow.Foundation.ObservableBase<UNIT> -> Meadow.Foundation.SamplingSensorBase<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; protected set; }

Methods

StartUpdating(TimeSpan?)

Starts updating the sensor on the updateInterval frequency specified

View Source
public override void StartUpdating(TimeSpan? updateInterval = null)
Parameters
TypeNameDescription
System.Nullable<System.TimeSpan>updateIntervalA TimeSpan that specifies how long to
wait between readings

StopUpdating()

Stops sampling the sensor

View Source
public override void StopUpdating()

Events

TemperatureUpdated

Raised when the temperature is updated

View Source
public event EventHandler<IChangeResult<Temperature>> TemperatureUpdated
Event Type

System.EventHandler<Meadow.IChangeResult<Meadow.Units.Temperature>>

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