Skip to content

Latest commit

 

History

History
81 lines (58 loc) · 2.72 KB

Meadow.Foundation.Sensors.Environmental.Ags01Db.md

File metadata and controls

81 lines (58 loc) · 2.72 KB
uidslug
Meadow.Foundation.Sensors.Environmental.Ags01Db
/docs/api/Meadow.Foundation/Meadow.Foundation.Sensors.Environmental.Ags01Db
Ags01Db
Status<img src="https://img.shields.io/badge/Working-brightgreen" style={{ width: "auto", height: "-webkit-fill-available" }} alt="Status badge: working" />
Source codeGitHub
Datasheet(s)GitHub
NuGet packageNuGet Gallery for Meadow.Foundation.Sensors.Environmental.Ags01Db

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

Supply voltage(V) 3.35.5 Supply current(mA) <30 Measuring range(ppm) 0100 Operating range (°C) 050 Operating range (% RH) 095 Interface I²C Size:LWH (mm) 23.312.55.8

Code Example

Ags01Dbags10Db;publicoverrideTaskInitialize(){Resolver.Log.Info("Initialize ...");ags10Db=newAgs01Db(Device.CreateI2cBus());Resolver.Log.Info($"Version: v{ags10Db.GetVersion()}");varconsumer=Ags01Db.CreateObserver(handler: result =>{Resolver.Log.Info($"Concentration New Value {result.New.PartsPerMillion}ppm");Resolver.Log.Info($"Concentration Old Value {result.Old?.PartsPerMillion}ppm");},filter:null);ags10Db.Subscribe(consumer);ags10Db.Updated+=(objectsender,IChangeResult<Meadow.Units.Concentration>e)=>{Resolver.Log.Info($"Concentration Updated: {e.New.PartsPerMillion:N2}ppm");};returnTask.CompletedTask;}publicoverrideTaskRun(){ags10Db.StartUpdating(TimeSpan.FromSeconds(1));returnTask.CompletedTask;}

Sample project(s) available on GitHub

Wiring Example

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

Ags01DbMeadow Pin
GNDGND
SCLD08 (SCL)
SDAD07 (SDA)
VCC3V3

It should look like the following diagram:

close