C# library for interfacing with the PMS5003 Particulate Matter Sensor
Find a file
2022-12-21 18:22:02 +02:00
.idea/.idea.PMS5003/.idea Fix library: Start search from start frame 2022-12-21 18:19:00 +02:00
PMS5003 Fix library: Start search from start frame 2022-12-21 18:19:00 +02: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 Delete test project. 2022-12-21 18:22:02 +02:00
PMS5003.sln.DotSettings.user Initial Commit 2021-04-10 17:49:36 +03:00
readme.md Fix library: Start search from start frame 2022-12-21 18:19:00 +02: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("COM3", -1, -1);
            while (true)
            {
                try
                {
                    var data = pms.ReadData();
                    Console.WriteLine(data);
                    Thread.Sleep(2000);
                }
                catch (Exception e)
                {
                    Console.WriteLine(e);
                }
            }
        }
    }
}