Skip to main content

Class Y4000

Represents a Yosemitech Y4000 Multiparameter Sonde water quality sensor for dissolved oxygen, conductivity, turbidity, pH, chlorophyll, blue green algae, chlorophyll, and temperature

Assembly: Y4000.dll
View Source
Declaration
public class Y4000 : IDisposable, IY4000, IWaterQualityConcentrationsSensor, ISamplingSensor<WaterQualityConcentrations>, ISensor<WaterQualityConcentrations>, IElectricalConductivitySensor, ISamplingSensor<Conductivity>, ISensor<Conductivity>, IPotentialHydrogenSensor, ISamplingSensor<PotentialHydrogen>, ISensor<PotentialHydrogen>, ITurbiditySensor, ISamplingSensor<Turbidity>, ISensor<Turbidity>, ITemperatureSensor, ISamplingSensor<Temperature>, ISensor<Temperature>, IRedoxPotentialSensor, ISamplingSensor<Voltage>, ISensor<Voltage>, ISensor, ISamplingSensor

Implements:

Expand

System.IDisposable, Meadow.Foundation.Sensors.Environmental.IY4000, Meadow.Peripherals.Sensors.ISamplingSensor<Meadow.Units.Voltage>, Meadow.Peripherals.Sensors.ISensor<Meadow.Units.Voltage>, Meadow.Peripherals.Sensors.ISensor, Meadow.Peripherals.Sensors.ISamplingSensor

Properties

UpdateInterval

A TimeSpan that specifies how long to wait between readings

View Source
Declaration
public TimeSpan UpdateInterval { get; }

IsSampling

Gets a value indicating whether the sensor is currently sampling

View Source
Declaration
public bool IsSampling { get; }

IsDisposed

Is the object disposed

View Source
Declaration
public bool IsDisposed { get; }

ModbusAddress

The current modbus address

View Source
Declaration
public byte ModbusAddress { get; }

Fields

DefaultBaudRate

The default baud rate for communicating with the device

View Source
Declaration
public const int DefaultBaudRate = 9600

Methods

StartUpdating(TimeSpan?)

Starts updating the sensor on the updateInterval frequency specified

View Source
Declaration
public void StartUpdating(TimeSpan? updateInterval)
Parameters
TypeNameDescription
System.Nullable<System.TimeSpan>updateIntervalA TimeSpan that specifies how long to
wait between readings

StopUpdating()

Stops sampling the sensor

View Source
Declaration
public void StopUpdating()

ReadSensor()

Reads all measurements of the sensor

View Source
Declaration
public Task<Y4000.Measurements?> ReadSensor()
Returns

System.Threading.Tasks.Task<System.Nullable<Meadow.Foundation.Sensors.Environmental.Y4000.Measurements>>

Initialize()

Initialize sensor

View Source
Declaration
public Task Initialize()
Returns

System.Threading.Tasks.Task

GetISDN()

Get the device ISDN (address) of the sensor Note this is a broadcast event so all Y4000 devices on the bus will respond

View Source
Declaration
public Task<byte> GetISDN()
Returns

System.Threading.Tasks.Task<System.Byte>: The address as a byte### SetISDN(byte) Set the ISDN (address) of the sensor

View Source
Declaration
public Task SetISDN(byte modbusAddress)
Returns

System.Threading.Tasks.Task

Parameters
TypeNameDescription
System.BytemodbusAddressThe address

GetSupplyVoltage()

Get the current supply voltage

View Source
Declaration
public Task<Voltage> GetSupplyVoltage()
Returns

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

GetSerialNumber()

Get the device serial number

View Source
Declaration
public Task<string> GetSerialNumber()
Returns

System.Threading.Tasks.Task<System.String>: The serial number### GetVersion() Get the device version

View Source
Declaration
public Task<ushort[]> GetVersion()
Returns

System.Threading.Tasks.Task<System.UInt16[]>

GetBrushInterval()

Get the brush or wiper interval

View Source
Declaration
public Task<TimeSpan> GetBrushInterval()
Returns

System.Threading.Tasks.Task<System.TimeSpan>

SetBrushInterval(TimeSpan)

Set the brush or wiper interval (normalized to minutes)

View Source
Declaration
public Task SetBrushInterval(TimeSpan interval)
Returns

System.Threading.Tasks.Task

Parameters
TypeName
System.TimeSpaninterval

StartBrush()

Start the brush or wiper

View Source
Declaration
public Task StartBrush()
Returns

System.Threading.Tasks.Task

GetErrorFlag()

Read the error flag from the sensor

View Source
Declaration
public Task<ushort> GetErrorFlag()
Returns

System.Threading.Tasks.Task<System.UInt16>

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 virtual void Dispose(bool disposing)
Parameters
TypeNameDescription
System.BooleandisposingIs disposing

Implements

  • System.IDisposable
  • Meadow.Foundation.Sensors.Environmental.IY4000
  • Meadow.Foundation.Sensors.Environmental.IWaterQualityConcentrationsSensor
  • Meadow.Peripherals.Sensors.ISamplingSensor<Meadow.Foundation.Sensors.Environmental.WaterQualityConcentrations>
  • Meadow.Peripherals.Sensors.ISensor<Meadow.Foundation.Sensors.Environmental.WaterQualityConcentrations>
  • Meadow.Peripherals.Sensors.IElectricalConductivitySensor
  • Meadow.Peripherals.Sensors.ISamplingSensor<Meadow.Units.Conductivity>
  • Meadow.Peripherals.Sensors.ISensor<Meadow.Units.Conductivity>
  • Meadow.Peripherals.Sensors.Environmental.IPotentialHydrogenSensor
  • Meadow.Peripherals.Sensors.ISamplingSensor<Meadow.Units.PotentialHydrogen>
  • Meadow.Peripherals.Sensors.ISensor<Meadow.Units.PotentialHydrogen>
  • Meadow.Peripherals.Sensors.Environmental.ITurbiditySensor
  • Meadow.Peripherals.Sensors.ISamplingSensor<Meadow.Units.Turbidity>
  • Meadow.Peripherals.Sensors.ISensor<Meadow.Units.Turbidity>
  • Meadow.Peripherals.Sensors.ITemperatureSensor
  • Meadow.Peripherals.Sensors.ISamplingSensor<Meadow.Units.Temperature>
  • Meadow.Peripherals.Sensors.ISensor<Meadow.Units.Temperature>
  • Meadow.Foundation.Sensors.Environmental.IRedoxPotentialSensor
  • Meadow.Peripherals.Sensors.ISamplingSensor<Meadow.Units.Voltage>
  • Meadow.Peripherals.Sensors.ISensor<Meadow.Units.Voltage>
  • Meadow.Peripherals.Sensors.ISensor
  • Meadow.Peripherals.Sensors.ISamplingSensor