pms5003/PMS5003/readme.md
2021-04-10 17:49:36 +03:00

812 B

Introduction

C# Library for interfacing with the PMS5003 Particulate Matter Sensor.

For wiring the Sensor consult the datasheet.

Example

using System;
using System.Threading;

namespace Application
{
    class Example
    {
        static void Main(string[] args)
        {
            var pms = new Pms5003();
            while (true)
            {
                try
                {
                    var data = pms.ReadData();
                    Console.WriteLine(data);
                    Thread.Sleep(2000);
                }
                catch (Exception e)
                {
                    Console.WriteLine(e);
                }
            }
        }
    }
}