pms5003

package
v0.0.0-...-860d388 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 4, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package pms5003 talks to the PMS5003 particulate matter sensor. Code is more or less ported from Pimoroni's original: https://github.com/pimoroni/pms5003-python We basically just read bytes from a serial connection.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close

func Close()

Close closes the connection with the PMS5003 serial port

func Open

func Open(pi *raspi.Adaptor) (err error)

Open resets and connects to the PMS5003

func Reset

func Reset(pi *raspi.Adaptor) (err error)

Reset attempts to reset the PMS5003

Types

type Frame

type Frame struct {
	Standard10     uint16
	Standard25     uint16
	Standard100    uint16
	Environment10  uint16
	Environment25  uint16
	Environment100 uint16
	Count3um       uint16
	Count5um       uint16
	Count10um      uint16
	Count25um      uint16
	Count50um      uint16
	Count100um     uint16
}

Frame is the data measured by the sensor. The standard and environment values are PM concentrations (μ g/m3). Environment values are the measure of the concentrations in the atmospheric environment. Standard values are adjusted to the U.S. Standard Atmosphere at 0 km sea level.

Reference:

func ReadFrame

func ReadFrame() (Frame, error)

ReadFrame reads a Frame of data from the sensor

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL