Skip to main content

Class Pmsa003i

Represents a Pmsa003i AQI particulate matter sensor

Assembly: Pmsa300i.dll
View Source
public class Pmsa003i : ByteCommsSensorBase<(Density? StandardParticulateMatter_1micron, Density? StandardParticulateMatter_2_5micron, Density? StandardParticulateMatter_10micron, Density? EnvironmentalParticulateMatter_1micron, Density? EnvironmentalParticulateMatter_2_5micron, Density? EnvironmentalParticulateMatter_10micron, ParticleDensity? ParticleDensity_0_3microns, ParticleDensity? ParticleDensity_0_5microns, ParticleDensity? ParticleDensity_10microns, ParticleDensity? ParticleDensity_25microns, ParticleDensity? ParticleDensity_50microns, ParticleDensity? ParticleDensity_100microns)>, IObservable<IChangeResult<(Density? StandardParticulateMatter_1micron, Density? StandardParticulateMatter_2_5micron, Density? StandardParticulateMatter_10micron, Density? EnvironmentalParticulateMatter_1micron, Density? EnvironmentalParticulateMatter_2_5micron, Density? EnvironmentalParticulateMatter_10micron, ParticleDensity? ParticleDensity_0_3microns, ParticleDensity? ParticleDensity_0_5microns, ParticleDensity? ParticleDensity_10microns, ParticleDensity? ParticleDensity_25microns, ParticleDensity? ParticleDensity_50microns, ParticleDensity? ParticleDensity_100microns)>>, ISamplingSensor<(Density? StandardParticulateMatter_1micron, Density? StandardParticulateMatter_2_5micron, Density? StandardParticulateMatter_10micron, Density? EnvironmentalParticulateMatter_1micron, Density? EnvironmentalParticulateMatter_2_5micron, Density? EnvironmentalParticulateMatter_10micron, ParticleDensity? ParticleDensity_0_3microns, ParticleDensity? ParticleDensity_0_5microns, ParticleDensity? ParticleDensity_10microns, ParticleDensity? ParticleDensity_25microns, ParticleDensity? ParticleDensity_50microns, ParticleDensity? ParticleDensity_100microns)>, ISensor<(Density? StandardParticulateMatter_1micron, Density? StandardParticulateMatter_2_5micron, Density? StandardParticulateMatter_10micron, Density? EnvironmentalParticulateMatter_1micron, Density? EnvironmentalParticulateMatter_2_5micron, Density? EnvironmentalParticulateMatter_10micron, ParticleDensity? ParticleDensity_0_3microns, ParticleDensity? ParticleDensity_0_5microns, ParticleDensity? ParticleDensity_10microns, ParticleDensity? ParticleDensity_25microns, ParticleDensity? ParticleDensity_50microns, ParticleDensity? ParticleDensity_100microns)>, ISensor, ISamplingSensor, IDisposable, II2cPeripheral

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

Implements:
System.IObservable<Meadow.IChangeResult<System.ValueTuple<System.Nullable<Meadow.Units.Density>,System.Nullable<Meadow.Units.Density>,System.Nullable<Meadow.Units.Density>,System.Nullable<Meadow.Units.Density>,System.Nullable<Meadow.Units.Density>,System.Nullable<Meadow.Units.Density>,System.Nullable<Meadow.Units.ParticleDensity>,System.ValueTuple<System.Nullable<Meadow.Units.ParticleDensity>,System.Nullable<Meadow.Units.ParticleDensity>,System.Nullable<Meadow.Units.ParticleDensity>,System.Nullable<Meadow.Units.ParticleDensity>,System.Nullable<Meadow.Units.ParticleDensity>>>>>, Meadow.Peripherals.Sensors.ISamplingSensor<System.ValueTuple<System.Nullable<Meadow.Units.Density>,System.Nullable<Meadow.Units.Density>,System.Nullable<Meadow.Units.Density>,System.Nullable<Meadow.Units.Density>,System.Nullable<Meadow.Units.Density>,System.Nullable<Meadow.Units.Density>,System.Nullable<Meadow.Units.ParticleDensity>,System.ValueTuple<System.Nullable<Meadow.Units.ParticleDensity>,System.Nullable<Meadow.Units.ParticleDensity>,System.Nullable<Meadow.Units.ParticleDensity>,System.Nullable<Meadow.Units.ParticleDensity>,System.Nullable<Meadow.Units.ParticleDensity>>>>, Meadow.Peripherals.Sensors.ISensor<System.ValueTuple<System.Nullable<Meadow.Units.Density>,System.Nullable<Meadow.Units.Density>,System.Nullable<Meadow.Units.Density>,System.Nullable<Meadow.Units.Density>,System.Nullable<Meadow.Units.Density>,System.Nullable<Meadow.Units.Density>,System.Nullable<Meadow.Units.ParticleDensity>,System.ValueTuple<System.Nullable<Meadow.Units.ParticleDensity>,System.Nullable<Meadow.Units.ParticleDensity>,System.Nullable<Meadow.Units.ParticleDensity>,System.Nullable<Meadow.Units.ParticleDensity>,System.Nullable<Meadow.Units.ParticleDensity>>>>, Meadow.Peripherals.Sensors.ISensor, Meadow.Peripherals.Sensors.ISamplingSensor, System.IDisposable, Meadow.Hardware.II2cPeripheral

Properties

PM1_0Std

Standard particulate matter PM1.0 density

View Source
public Density? PM1_0Std { get; }

PM2_5Std

Standard particulate matter PM2.5 density

View Source
public Density? PM2_5Std { get; }

PM10_0Std

Standard particulate matter PM10 density

View Source
public Density? PM10_0Std { get; }

PM1_0Env

Standard particulate matter PM1.0 density

View Source
public Density? PM1_0Env { get; }

PM2_5Env

Standard particulate matter PM2.5 density

View Source
public Density? PM2_5Env { get; }

PM10_0Env

Standard particulate matter PM10 density

View Source
public Density? PM10_0Env { get; }

CountOf0_3micronParticles

Particle density of 0 - 0.3 micron particles in air

View Source
public ParticleDensity? CountOf0_3micronParticles { get; }

CountOf0_5micronParticles

Particle density of 0.3 - 0.5 micron particles in air

View Source
public ParticleDensity? CountOf0_5micronParticles { get; }

CountOf10micronParticles

Particle density of 0.5 - 10 micron particles in air

View Source
public ParticleDensity? CountOf10micronParticles { get; }

CountOf25micronParticles

Particle density of 0.5 - 10 micron particles in air

View Source
public ParticleDensity? CountOf25micronParticles { get; }

CountOf50micronParticles

Particle density of 10 - 50 micron particles in air

View Source
public ParticleDensity? CountOf50micronParticles { get; }

CountOf100micronParticles

Particle density of 50 - 100 micron particles in air

View Source
public ParticleDensity? CountOf100micronParticles { get; }

DefaultI2cAddress

The default I2C address for the peripheral

View Source
public byte DefaultI2cAddress { get; }

Methods

StartUpdating(TimeSpan?)

Starts updating the sensor on the updateInterval frequency specified

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

StopUpdating()

Stop updating the sensor The sensor will not respond to commands for 500ms The call will delay the calling thread for 500ms

View Source
public override void StopUpdating()

ReadSensor()

Read data from the sensor

View Source
protected override Task<(Density? StandardParticulateMatter_1micron, Density? StandardParticulateMatter_2_5micron, Density? StandardParticulateMatter_10micron, Density? EnvironmentalParticulateMatter_1micron, Density? EnvironmentalParticulateMatter_2_5micron, Density? EnvironmentalParticulateMatter_10micron, ParticleDensity? ParticleDensity_0_3microns, ParticleDensity? ParticleDensity_0_5microns, ParticleDensity? ParticleDensity_10microns, ParticleDensity? ParticleDensity_25microns, ParticleDensity? ParticleDensity_50microns, ParticleDensity? ParticleDensity_100microns)> ReadSensor()
Returns

System.Threading.Tasks.Task<System.ValueTuple<System.Nullable<Meadow.Units.Density>,System.Nullable<Meadow.Units.Density>,System.Nullable<Meadow.Units.Density>,System.Nullable<Meadow.Units.Density>,System.Nullable<Meadow.Units.Density>,System.Nullable<Meadow.Units.Density>,System.Nullable<Meadow.Units.ParticleDensity>,System.ValueTuple<System.Nullable<Meadow.Units.ParticleDensity>,System.Nullable<Meadow.Units.ParticleDensity>,System.Nullable<Meadow.Units.ParticleDensity>,System.Nullable<Meadow.Units.ParticleDensity>,System.Nullable<Meadow.Units.ParticleDensity>>>>

Exceptions

System.Exception

RaiseEventsAndNotify(IChangeResult<(Density? StandardParticulateMatter_1micron, Density? StandardParticulateMatter_2_5micron, Density? StandardParticulateMatter_10micron, Density? EnvironmentalParticulateMatter_1micron, Density? EnvironmentalParticulateMatter_2_5micron, Density? EnvironmentalParticulateMatter_10micron, ParticleDensity? ParticleDensity_0_3microns, ParticleDensity? ParticleDensity_0_5microns, ParticleDensity? ParticleDensity_10microns, ParticleDensity? ParticleDensity_25microns, ParticleDensity? ParticleDensity_50microns, ParticleDensity? ParticleDensity_100microns)>)

Raise change events for subscribers

View Source
protected override void RaiseEventsAndNotify(IChangeResult<(Density? StandardParticulateMatter_1micron, Density? StandardParticulateMatter_2_5micron, Density? StandardParticulateMatter_10micron, Density? EnvironmentalParticulateMatter_1micron, Density? EnvironmentalParticulateMatter_2_5micron, Density? EnvironmentalParticulateMatter_10micron, ParticleDensity? ParticleDensity_0_3microns, ParticleDensity? ParticleDensity_0_5microns, ParticleDensity? ParticleDensity_10microns, ParticleDensity? ParticleDensity_25microns, ParticleDensity? ParticleDensity_50microns, ParticleDensity? ParticleDensity_100microns)> changeResult)
Parameters
TypeNameDescription
Meadow.IChangeResult<System.ValueTuple<System.Nullable<Meadow.Units.Density>,System.Nullable<Meadow.Units.Density>,System.Nullable<Meadow.Units.Density>,System.Nullable<Meadow.Units.Density>,System.Nullable<Meadow.Units.Density>,System.Nullable<Meadow.Units.Density>,System.Nullable<Meadow.Units.ParticleDensity>,System.ValueTuple<System.Nullable<Meadow.Units.ParticleDensity>,System.Nullable<Meadow.Units.ParticleDensity>,System.Nullable<Meadow.Units.ParticleDensity>,System.Nullable<Meadow.Units.ParticleDensity>,System.Nullable<Meadow.Units.ParticleDensity>>>>changeResultThe change result with the current sensor data

Events

StandardPM_1micronUpdated

Raised when the Standard particulate matter PM1.0 density changes

View Source
public event EventHandler<IChangeResult<Density>> StandardPM_1micronUpdated
Event Type

System.EventHandler<Meadow.IChangeResult<Meadow.Units.Density>>

StandardPM_2_5micronUpdated

Raised when the Standard particulate matter PM2.5 density changes

View Source
public event EventHandler<IChangeResult<Density>> StandardPM_2_5micronUpdated
Event Type

System.EventHandler<Meadow.IChangeResult<Meadow.Units.Density>>

StandardPM_10micronUpdated

Raised when the Standard particulate matter PM10.0 density changes

View Source
public event EventHandler<IChangeResult<Density>> StandardPM_10micronUpdated
Event Type

System.EventHandler<Meadow.IChangeResult<Meadow.Units.Density>>

EnvironmentalPM_1micronUpdated

Raised when the Environment particulate matter PM1.0 density changes

View Source
public event EventHandler<IChangeResult<Density>> EnvironmentalPM_1micronUpdated
Event Type

System.EventHandler<Meadow.IChangeResult<Meadow.Units.Density>>

EnvironmentalPM_2_5micronUpdated

Raised when the Environment particulate matter PM2.5 density changes

View Source
public event EventHandler<IChangeResult<Density>> EnvironmentalPM_2_5micronUpdated
Event Type

System.EventHandler<Meadow.IChangeResult<Meadow.Units.Density>>

EnvironmentalPM_10micronUpdated

Raised when the Environment particulate matter PM10.0 density changes

View Source
public event EventHandler<IChangeResult<Density>> EnvironmentalPM_10micronUpdated
Event Type

System.EventHandler<Meadow.IChangeResult<Meadow.Units.Density>>

CountOf0_3micronParticlesUpdated

Raised when the number of 0-0.3 micron particles (in 0.1 liters of air) changes

View Source
public event EventHandler<IChangeResult<ParticleDensity>> CountOf0_3micronParticlesUpdated
Event Type

System.EventHandler<Meadow.IChangeResult<Meadow.Units.ParticleDensity>>

CountOf0_5micronParticlesUpdated

Raised when the number of 0.3-0.5 micron particles (in 0.1 liters of air) changes

View Source
public event EventHandler<IChangeResult<ParticleDensity>> CountOf0_5micronParticlesUpdated
Event Type

System.EventHandler<Meadow.IChangeResult<Meadow.Units.ParticleDensity>>

CountOf10micronParticlesUpdated

Raised when the number of 0.5-10 micron particles changes

View Source
public event EventHandler<IChangeResult<ParticleDensity>> CountOf10micronParticlesUpdated
Event Type

System.EventHandler<Meadow.IChangeResult<Meadow.Units.ParticleDensity>>

CountOf25micronParticlesUpdated

Raised when the number of 10-25 micron particles (in 0.1 liters of air) changes

View Source
public event EventHandler<IChangeResult<ParticleDensity>> CountOf25micronParticlesUpdated
Event Type

System.EventHandler<Meadow.IChangeResult<Meadow.Units.ParticleDensity>>

CountOf50micronParticlesUpdated

Raised when the number of 25-50 micron particles (in 0.1 liters of air) changes

View Source
public event EventHandler<IChangeResult<ParticleDensity>> CountOf50micronParticlesUpdated
Event Type

System.EventHandler<Meadow.IChangeResult<Meadow.Units.ParticleDensity>>

CountOf100micronParticlesUpdated

Raised when the number of 50-100 micron particles (in 0.1 liters of air) changes

View Source
public event EventHandler<IChangeResult<ParticleDensity>> CountOf100micronParticlesUpdated
Event Type

System.EventHandler<Meadow.IChangeResult<Meadow.Units.ParticleDensity>>

Implements

  • System.IObservable<Meadow.IChangeResult<System.ValueTuple<System.Nullable<Meadow.Units.Density>,System.Nullable<Meadow.Units.Density>,System.Nullable<Meadow.Units.Density>,System.Nullable<Meadow.Units.Density>,System.Nullable<Meadow.Units.Density>,System.Nullable<Meadow.Units.Density>,System.Nullable<Meadow.Units.ParticleDensity>,System.ValueTuple<System.Nullable<Meadow.Units.ParticleDensity>,System.Nullable<Meadow.Units.ParticleDensity>,System.Nullable<Meadow.Units.ParticleDensity>,System.Nullable<Meadow.Units.ParticleDensity>,System.Nullable<Meadow.Units.ParticleDensity>>>>>
  • Meadow.Peripherals.Sensors.ISamplingSensor<System.ValueTuple<System.Nullable<Meadow.Units.Density>,System.Nullable<Meadow.Units.Density>,System.Nullable<Meadow.Units.Density>,System.Nullable<Meadow.Units.Density>,System.Nullable<Meadow.Units.Density>,System.Nullable<Meadow.Units.Density>,System.Nullable<Meadow.Units.ParticleDensity>,System.ValueTuple<System.Nullable<Meadow.Units.ParticleDensity>,System.Nullable<Meadow.Units.ParticleDensity>,System.Nullable<Meadow.Units.ParticleDensity>,System.Nullable<Meadow.Units.ParticleDensity>,System.Nullable<Meadow.Units.ParticleDensity>>>>
  • Meadow.Peripherals.Sensors.ISensor<System.ValueTuple<System.Nullable<Meadow.Units.Density>,System.Nullable<Meadow.Units.Density>,System.Nullable<Meadow.Units.Density>,System.Nullable<Meadow.Units.Density>,System.Nullable<Meadow.Units.Density>,System.Nullable<Meadow.Units.Density>,System.Nullable<Meadow.Units.ParticleDensity>,System.ValueTuple<System.Nullable<Meadow.Units.ParticleDensity>,System.Nullable<Meadow.Units.ParticleDensity>,System.Nullable<Meadow.Units.ParticleDensity>,System.Nullable<Meadow.Units.ParticleDensity>,System.Nullable<Meadow.Units.ParticleDensity>>>>
  • Meadow.Peripherals.Sensors.ISensor
  • Meadow.Peripherals.Sensors.ISamplingSensor
  • System.IDisposable
  • Meadow.Hardware.II2cPeripheral