From 40c27f8c66bc020c7b64c12104d0510438498677 Mon Sep 17 00:00:00 2001 From: August Quint <49277349+AugustQu@users.noreply.github.com> Date: Wed, 19 Feb 2020 13:57:21 +0100 Subject: [PATCH] Update sds011read.cpp --- src/sds011read.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/sds011read.cpp b/src/sds011read.cpp index cf6dccdf..13df56fa 100644 --- a/src/sds011read.cpp +++ b/src/sds011read.cpp @@ -21,12 +21,11 @@ boolean isSDS011Active; bool sds011_init() { pm25 = pm10 = 0.0; - sdsSerial.begin(9600, SERIAL_8N1, ESP_PIN_RX, ESP_PIN_TX); - sdsSensor.begin (&sdsSerial); - sdsSensor.contmode(0); // for safety: no wakeup/sleep by the sensor - sds011_sleep(); // we do it by ourselves - return true; + sdsSensor.begin (&sdsSerial, ESP_PIN_RX, ESP_PIN_TX); + sds011_sleep(); // we do sleep/wakup by ourselves + return true; } + // reading data: void sds011_loop() {