Skip to main content

Class SerialWombatBase.Hcsr04

Represents a HCSR04 distance sensor connected to a Serial Wombat

Assembly: SerialWombat.dll​
View Source​
Declaration
public class SerialWombatBase.Hcsr04 : Hcsr04, IObservable<IChangeResult<Length>>, IRangeFinder, ISamplingSensor<Length>, ISensor<Length>, ISensor, ISamplingSensor, IDisposable

Inheritance: System.Object -> Meadow.Foundation.ObservableBase<UNIT>

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​
Declaration
public static TimeSpan DefaultReadPeriod { get; }

Methods​

MeasureDistance()​

Start a distance measurement

View Source​
Declaration
public override void MeasureDistance()

Dispose(bool)​

Dispose of the object

View Source​
Declaration
protected override void Dispose(bool disposing)
Parameters​
TypeNameDescription
System.BooleandisposingIs disposing

Dispose()​

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

View Source​
Declaration
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