Skip to main content

Class Veml7700

High Accuracy Ambient Light Sensor

Assembly: Veml7700.dll
View Source
public class Veml7700 : ByteCommsSensorBase<Illuminance>, IObservable<IChangeResult<Illuminance>>, ILightSensor, ISamplingSensor<Illuminance>, ISensor<Illuminance>, ISensor, ISamplingSensor, II2cPeripheral, IDisposable

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

Implements:
System.IObservable<Meadow.IChangeResult<Meadow.Units.Illuminance>>, Meadow.Peripherals.Sensors.Light.ILightSensor, Meadow.Peripherals.Sensors.ISamplingSensor<Meadow.Units.Illuminance>, Meadow.Peripherals.Sensors.ISensor<Meadow.Units.Illuminance>, Meadow.Peripherals.Sensors.ISensor, Meadow.Peripherals.Sensors.ISamplingSensor, Meadow.Hardware.II2cPeripheral, System.IDisposable

Properties

Illuminance

Luminosity reading from the TSL2561 sensor.

View Source
public Illuminance? Illuminance { get; protected set; }

DataSource

Sensor types Data source

View Source
public Veml7700.SensorTypes DataSource { get; set; }

DefaultI2cAddress

The default I2C address for the peripheral

View Source
public byte DefaultI2cAddress { get; }

Methods

ReadSensor()

Reads data from the sensor

View Source
protected override Task<Illuminance> ReadSensor()
Returns

System.Threading.Tasks.Task<Meadow.Units.Illuminance>: The latest sensor reading### SetPower(bool) Set power mode

View Source
public void SetPower(bool on)
Parameters
TypeName
System.Booleanon

Events

RangeExceededHigh

Raised when the high range is exceeded

View Source
public event EventHandler RangeExceededHigh
Event Type

System.EventHandler

RangeExceededLow

Raised when the low range is exceeded

View Source
public event EventHandler RangeExceededLow
Event Type

System.EventHandler

Implements

  • System.IObservable<Meadow.IChangeResult<Meadow.Units.Illuminance>>
  • Meadow.Peripherals.Sensors.Light.ILightSensor
  • Meadow.Peripherals.Sensors.ISamplingSensor<Meadow.Units.Illuminance>
  • Meadow.Peripherals.Sensors.ISensor<Meadow.Units.Illuminance>
  • Meadow.Peripherals.Sensors.ISensor
  • Meadow.Peripherals.Sensors.ISamplingSensor
  • Meadow.Hardware.II2cPeripheral
  • System.IDisposable