C# library for interfacing with the PMS5003 Particulate Matter Sensor
Find a file
2021-04-11 15:47:32 +03:00
.idea/.idea.PMS5003/.idea Initial Commit 2021-04-10 17:49:36 +03:00
PMS5003 Add package on Github packages. 2021-04-11 15:47:32 +03:00
PMS5003Tests Initial Commit 2021-04-10 17:49:36 +03:00
.gitignore Initial Commit 2021-04-10 17:49:36 +03:00
LICENSE Create LICENSE 2021-04-11 15:22:00 +03:00
PMS5003.sln Initial Commit 2021-04-10 17:49:36 +03:00
PMS5003.sln.DotSettings.user Initial Commit 2021-04-10 17:49:36 +03:00
readme.md Update readme.md 2021-04-10 17:55:38 +03:00

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);
                }
            }
        }
    }
}