Skip to main content

Meadow.Foundation.Sensors.Distance.MaxBotix

MaxBotix
StatusStatus badge: working
Source codeGitHub
NuGet packageNuGet Gallery for Meadow.Foundation.Sensors.Distance.MaxBotix

Code Example




Sample project(s) available on GitHub

Wiring Example

To wire a MaxBotix to your Meadow board, connect the following:

MaxBotixMeadow Pin
GNDGND
SCLD08 (SCL)
SDAD07 (SDA)
VCC3V3

Class MaxBotix

Represents the MaxBotix series of distance sensors

Assembly: MaxBotix.dll
View Source
Declaration
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
Declaration
public Length? Distance { get; protected set; }

VCC

voltage common collector (VCC) typically 3.3V

View Source
Declaration
public double VCC { get; set; }

IsDisposed

Is the object disposed

View Source
Declaration
public bool IsDisposed { get; }

DefaultI2cAddress

The default I2C address for the peripheral

View Source
Declaration
public byte DefaultI2cAddress { get; }

Methods

MeasureDistance()

Start a distance measurement

View Source
Declaration
public void MeasureDistance()

ReadSensor()

Read the distance from the sensor

View Source
Declaration
protected override Task<Length> ReadSensor()
Returns

System.Threading.Tasks.Task<Meadow.Units.Length>

Exceptions

System.NotImplementedException

StartUpdating(TimeSpan?)

Start updating distances

View Source
Declaration
public override void StartUpdating(TimeSpan? updateInterval)
Parameters
TypeName
System.Nullable<System.TimeSpan>updateInterval

StopUpdating()

Stop sampling

View Source
Declaration
public override void StopUpdating()

Dispose()

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

View Source
Declaration
public void Dispose()

Dispose(bool)

Dispose of the object

View Source
Declaration
protected void Dispose(bool disposing)
Parameters
TypeNameDescription
System.BooleandisposingIs 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