Characteristic Locus
Inherited Members ISensor<UNIT>.Read()
Namespace Meadow.Peripherals.Sensors
Assembly Meadow.Contracts.dll

Syntax

public interface ISamplingSensor<UNIT> : ISensor<UNIT> where UNIT : struct

Type Parameters

Name Description
UNIT

Properties

IsSampling

Gets a value indicating whether the sensor is currently sampling

Declaration
bool IsSampling { get; }

Property Value

Type Description
bool

true if sampling, otherwise, false

UpdateInterval

A TimeSpan that specifies how long to wait between readings

Declaration
TimeSpan UpdateInterval { get; }

Property Value

Type Description
TimeSpan

Methods

StartUpdating(TimeSpan?)

Starts updating the sensor on the updateInterval frequency specified

Declaration
void StartUpdating(TimeSpan? updateInterval = null)

Parameters

Type Name Description
TimeSpan? updateInterval

A TimeSpan that specifies how long to wait between readings

StopUpdating()

Stops sampling the sensor

Declaration
void StopUpdating()