Class SerialWombatBase.Hcsr04
Represents a HCSR04 distance sensor connected to a Serial Wombat
Assembly: SerialWombat.dll
View Source
public class SerialWombatBase.Hcsr04 : Hcsr04, IObservable<IChangeResult<Length>>, IRangeFinder, ISamplingSensor<Length>, ISensor<Length>, ISensor, ISamplingSensor, IDisposable
Inheritance: System.Object
-> Meadow.Foundation.ObservableBase<UNIT> -> Meadow.Foundation.SamplingSensorBase<UNIT> -> Meadow.Foundation.Sensors.Distance.Hcsr04
Implements:
System.IObservable<Meadow.IChangeResult<Meadow.Units.Length>>
, Meadow.Peripherals.Sensors.Distance.IRangeFinder
, Meadow.Peripherals.Sensors.ISamplingSensor<Meadow.Units.Length>
, Meadow.Peripherals.Sensors.ISensor<Meadow.Units.Length>
, Meadow.Peripherals.Sensors.ISensor
, Meadow.Peripherals.Sensors.ISamplingSensor
, System.IDisposable
Properties
DefaultReadPeriod
The default sensor read period
View Source
public static TimeSpan DefaultReadPeriod { get; }
Methods
MeasureDistance()
Start a distance measurement
View Source
public override void MeasureDistance()
Dispose(bool)
Dispose of the object
View Source
protected override void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing | Is disposing |
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
View Source
public void Dispose()
Implements
System.IObservable<Meadow.IChangeResult<Meadow.Units.Length>>
Meadow.Peripherals.Sensors.Distance.IRangeFinder
Meadow.Peripherals.Sensors.ISamplingSensor<Meadow.Units.Length>
Meadow.Peripherals.Sensors.ISensor<Meadow.Units.Length>
Meadow.Peripherals.Sensors.ISensor
Meadow.Peripherals.Sensors.ISamplingSensor
System.IDisposable