Remarks

Ags01Db
Status
Source code GitHub
NuGet package

The AGS01DB is a MEMS VOC gas sensor that commuincates over I2C.

Supply voltage(V) 3.3~5.5 Supply current(mA) <30 Measuring range(ppm) 0~100 Operating range (°C) 0~50 Operating range (% RH) 0~95 Interface I²C Size:LWH (mm) 23.312.55.8

Code Example

public class MeadowApp : App<F7Micro, MeadowApp>
{
    Ags01Db sensor;

    public MeadowApp()
    {
        sensor = new Ags01Db(Device.CreateI2cBus());

        Console.WriteLine($"Version: v{sensor.GetVersion()}");

        while (true)
        {
            Console.WriteLine($"VOC gas concentration: {sensor.GetConcentration()}ppm");

            Thread.Sleep(2000);
        }
    }
}

Sample projects available on GitHub

Wiring Example

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

Ags01Db Meadow Pin
GND GND
SCL D08 (SCL)
SDA D07 (SDA)
VCC 3V3

It should look like the following diagram:

Characteristic Locus
Inheritance System.Object > Ags01Db
Inherited Members System.Object.ToString() System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.ReferenceEquals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone()
Namespace Meadow.Foundation.Sensors.Environmental
Assembly Ags01Db.dll

Syntax

public class Ags01Db

Constructors

Ags01Db(II2cBus, Byte)

Declaration
public Ags01Db(II2cBus i2cBus, byte address = 17)

Parameters

Type Name Description
II2cBus i2cBus
System.Byte address

Methods

GetConcentration()

Get ASG01DB VOC Gas Concentration

Declaration
public double GetConcentration()

Returns

Type Description
System.Double

Concentration (ppm)

GetVersion()

Get ASG01DB Version

Declaration
public byte GetVersion()

Returns

Type Description
System.Byte

Version