Skip to content

Commit

Permalink
Merge pull request #43 from TimOrme/switch_to_sdslib
Browse files Browse the repository at this point in the history
Switch to use SDS011Lib instead
  • Loading branch information
TimOrme authored May 12, 2023
2 parents 7db03f3 + 1384dfa commit 386ac8f
Show file tree
Hide file tree
Showing 12 changed files with 174 additions and 1,203 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
A simple Air Quality Index monitor, designed to work on the Raspberry Pi with the SDS011 Nova PM Sensor.

- [AQIMON](#aqimon)
- [Screenshot](#screenshot)
- [Installation](#installation)
- [Pre-Requisites](#pre-requisites)
- [Install](#install)
Expand All @@ -15,6 +16,10 @@ A simple Air Quality Index monitor, designed to work on the Raspberry Pi with th
- [Using the Mock Reader](#using-the-mock-reader)
- [Submitting a PR](#submitting-a-pr)

## Screenshot

![Screenshot](screenshot.png)

## Installation

### Pre-Requisites
Expand Down
4 changes: 2 additions & 2 deletions aqimon/read/novapm.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from . import AqiRead, ReaderState, ReaderStatus
import serial
from typing import Union
from .sds011 import QueryModeReader
from sds011lib import SDS011QueryReader
from statistics import mean


Expand All @@ -26,7 +26,7 @@ def __init__(
if isinstance(ser_dev, str):
ser_dev = serial.Serial(ser_dev, timeout=2)

self.reader = QueryModeReader(ser_dev=ser_dev, send_command_sleep=command_wait_time)
self.reader = SDS011QueryReader(ser_dev=ser_dev, send_command_sleep=command_wait_time)

# Initial the reader to be in the mode we want.
self.reader.wake()
Expand Down
316 changes: 0 additions & 316 deletions aqimon/read/sds011/__init__.py

This file was deleted.

Loading

0 comments on commit 386ac8f

Please sign in to comment.