Class MaxBotix
Represents the MaxBotix series of distance sensors
Assembly: MaxBotix.dll
View Source
public class MaxBotix : PollingSensorBase<Length>, IObservable<IChangeResult<Length>>, IRangeFinder, ISamplingSensor<Length>, ISensor<Length>, ISensor, ISamplingSensor, IDisposable, II2cPeripheral
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
, Meadow.Hardware.II2cPeripheral
Properties
Distance
Distance from sensor to object
View Source
public Length? Distance { get; protected set; }
VCC
voltage common collector (VCC) typically 3.3V
View Source
public double VCC { get; set; }
IsDisposed
Is the object disposed
View Source
public bool IsDisposed { get; }
DefaultI2cAddress
The default I2C address for the peripheral
View Source
public byte DefaultI2cAddress { get; }
Methods
MeasureDistance()
Start a distance measurement
View Source
public void MeasureDistance()
ReadSensor()
Read the distance from the sensor
View Source
protected override Task<Length> ReadSensor()
Returns
System.Threading.Tasks.Task<Meadow.Units.Length>
Exceptions
System.NotImplementedException
StartUpdating(TimeSpan?)
Start updating distances
View Source
public override void StartUpdating(TimeSpan? updateInterval)
Parameters
Type | Name |
---|---|
System.Nullable<System.TimeSpan> | updateInterval |
StopUpdating()
Stop sampling
View Source
public override void StopUpdating()
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
View Source
public void Dispose()
Dispose(bool)
Dispose of the object
View Source
protected void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing | Is disposing |
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
Meadow.Hardware.II2cPeripheral