nanoFramework.Iot.Device.Ags01db 2.0.0-preview.73

Prefix Reserved
This is a prerelease version of nanoFramework.Iot.Device.Ags01db.
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package nanoFramework.Iot.Device.Ags01db --version 2.0.0-preview.73
                    
NuGet\Install-Package nanoFramework.Iot.Device.Ags01db -Version 2.0.0-preview.73
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="nanoFramework.Iot.Device.Ags01db" Version="2.0.0-preview.73" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="nanoFramework.Iot.Device.Ags01db" Version="2.0.0-preview.73" />
                    
Directory.Packages.props
<PackageReference Include="nanoFramework.Iot.Device.Ags01db" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add nanoFramework.Iot.Device.Ags01db --version 2.0.0-preview.73
                    
#r "nuget: nanoFramework.Iot.Device.Ags01db, 2.0.0-preview.73"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package nanoFramework.Iot.Device.Ags01db@2.0.0-preview.73
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=nanoFramework.Iot.Device.Ags01db&version=2.0.0-preview.73&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=nanoFramework.Iot.Device.Ags01db&version=2.0.0-preview.73&prerelease
                    
Install as a Cake Tool

AGS01DB - MEMS VOC Gas Sensor

AGS01DB is a MEMS VOC gas sensor with calibrated digital signal output. It uses special digital module acquisition technology and gas sensing technology to ensure that the product has high reliability and excellent long-term stability.

Documentation

Products page in English

Datasheet in Chinese

Sensor Image

sensor

Usage

Important: make sure you properly setup the I2C pins especially for ESP32 before creating the I2cDevice, make sure you install the nanoFramework.Hardware.ESP32 nuget:

//////////////////////////////////////////////////////////////////////
// when connecting to an ESP32 device, need to configure the I2C GPIOs
// used for the bus
Configuration.SetPinFunction(21, DeviceFunction.I2C1_DATA);
Configuration.SetPinFunction(22, DeviceFunction.I2C1_CLOCK);

For other devices like STM32, please make sure you're using the preset pins for the I2C bus you want to use.

I2cConnectionSettings settings = new I2cConnectionSettings(1, Ags01db.DefaultI2cAddress);
I2cDevice device = I2cDevice.Create(settings);

using (Ags01db sensor = new Ags01db(device))
{
    // read AGS01DB version
    byte version = sensor.Version;

    // read VOC concentration
    double concentration = sensor.Concentration;
}

Example

Hardware Required

  • AGS01DB
  • 4.7kΩ resistance × 2
  • Male/Female Jumper Wires

Circuit

circuit

  • SCL - SCL
  • SDA - SDA
  • VCC - 5V
  • GND - GND

SDA, SCL need pull-up resistance.

Code

I2cConnectionSettings settings = new I2cConnectionSettings(1, Ags01db.DefaultI2cAddress);
I2cDevice device = I2cDevice.Create(settings);

using (Ags01db sensor = new Ags01db(device))
{
    // read AGS01DB version
    Debug.WriteLine($"Version: {sensor.Version}");
    Debug.WriteLine();

    while (true)
    {
        // read concentration
        Debug.WriteLine($"VOC Gas Concentration: {sensor.Concentration}ppm");
        Debug.WriteLine();

        Thread.Sleep(3000);
    }
}

Result

running result

Product Compatible and additional computed target framework versions.
.NETnanoFramework netnano1.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.0.0-preview.85 22 6/1/2026
2.0.0-preview.80 38 5/27/2026
2.0.0-preview.73 48 5/20/2026
2.0.0-preview.69 49 5/18/2026
2.0.0-preview.62 50 5/13/2026
2.0.0-preview.49 46 5/4/2026
2.0.0-preview.45 60 4/29/2026
2.0.0-preview.32 62 4/20/2026
2.0.0-preview.16 63 3/10/2026
1.2.952 128 3/4/2026
1.2.931 317 11/10/2025
1.2.907 279 10/2/2025
1.2.889 269 7/28/2025
1.2.869 327 4/2/2025
1.2.864 314 4/2/2025
1.2.852 332 3/11/2025
1.2.846 348 3/10/2025
1.2.822 268 2/26/2025
1.2.775 277 2/4/2025
1.2.772 281 2/4/2025
Loading failed