Comments (5)
Hi,
The method I use:
https://github.com/lewapek/sds-dust-sensors-arduino-library/blob/master/src/SdsDustSensorResults.h#L76
The method https://github.com/karlchen86/SDS011 uses:
https://github.com/karlchen86/SDS011/blob/master/sds011.c#L23
Both seems to be the same. Maybe rawBytes
aren't correct in one of the solutions?
You can print rawBytes
by defining __DEBUG_SDS_DUST_SENSOR__
(you need to compile the sources yourself)
from sds-dust-sensors-arduino-library.
I'm getting this kind of response when setting the debug param. Does this look alright at first sight? I don't know if all the retries are normal. I'll try to get the same output of the other library and try to compare them.
12:22:25.501 -> Working period: continuous
12:22:25.514 -> | <- read bytes with no more available
12:22:25.514 -> Retry #0 due to not available response
12:22:25.514 -> | <- read bytes with no more available
12:22:25.514 -> Retry #1 due to not available response
12:22:25.675 -> | <- read bytes with no more available
12:22:25.675 -> Retry #2 due to not available response
12:22:25.675 -> |AA|C0|7E|3|C2|3|3E|B2|36|AB| <- read bytes with success
12:22:25.695 -> PM2.5 = 89.40, PM10 = 96.20
12:22:25.728 -> pm25: 89.40, pm10: 96.20
12:22:26.127 -> | <- read bytes with no more available
12:22:26.160 -> Retry #0 due to not available response
12:22:26.193 -> | <- read bytes with no more available
12:22:26.260 -> Retry #1 due to not available response
12:22:26.293 -> | <- read bytes with no more available
12:22:26.326 -> Retry #2 due to not available response
12:22:26.359 -> | <- read bytes with no more available
12:22:26.426 -> Retry #3 due to not available response
12:22:26.459 -> | <- read bytes with no more available
12:22:26.492 -> Retry #4 due to not available response
12:22:26.525 -> | <- read bytes with no more available
12:22:26.592 -> Retry #5 due to not available response
12:22:26.625 -> |AA|C0|A5|3|ED|3|3E|B2|88|AB| <- read bytes with success
12:22:26.691 -> PM2.5 = 93.30, PM10 = 100.50
12:22:26.725 -> pm25: 93.30, pm10: 100.50
12:22:27.090 -> | <- read bytes with no more available
12:22:27.157 -> Retry #0 due to not available response
12:22:27.268 -> | <- read bytes with no more available
12:22:27.268 -> Retry #1 due to not available response
12:22:27.268 -> | <- read bytes with no more available
12:22:27.299 -> Retry #2 due to not available response
12:22:27.356 -> | <- read bytes with no more available
12:22:27.389 -> Retry #3 due to not available response
12:22:27.455 -> | <- read bytes with no more available
12:22:27.488 -> Retry #4 due to not available response
12:22:27.521 -> | <- read bytes with no more available
12:22:27.554 -> Retry #5 due to not available response
12:22:27.621 -> |AA|C0|C3|3|D|4|3E|B2|C7|AB| <- read bytes with success
12:22:27.654 -> PM2.5 = 96.30, PM10 = 103.70
12:22:27.687 -> pm25: 96.30, pm10: 103.70
12:22:28.086 -> | <- read bytes with no more available
12:22:28.119 -> Retry #0 due to not available response
12:22:28.185 -> | <- read bytes with no more available
12:22:28.219 -> Retry #1 due to not available response
12:22:28.252 -> | <- read bytes with no more available
12:22:28.285 -> Retry #2 due to not available response
12:22:28.351 -> | <- read bytes with no more available
12:22:28.385 -> Retry #3 due to not available response
12:22:28.418 -> | <- read bytes with no more available
12:22:28.451 -> Retry #4 due to not available response
12:22:28.517 -> | <- read bytes with no more available
12:22:28.551 -> Retry #5 due to not available response
12:22:28.584 -> | <- read bytes with no more available
12:22:28.650 -> Retry #6 due to not available response
12:22:28.683 -> |AA|C0|D9|3|25|4|3E|B2|F5|AB| <- read bytes with success
12:22:28.750 -> PM2.5 = 98.50, PM10 = 106.10
12:22:28.783 -> pm25: 98.50, pm10: 106.10
from sds-dust-sensors-arduino-library.
Results are consistent with bytes shown above, 3rd and 5th bytes have values 3 or 4. It means that PMs are >= 256*3/10 = 76.8.
Retries mean that stream (from sensor) doesn't contain data. When data appear, they are processed correctly (I guess - no other errors, InvalidHead, InvalidResponseId...)
Unfortunately I don't have much time to test and compare these 2 libraries.
However if anyone can check them (my library and https://github.com/karlchen86/SDS011) it would be great to write your observations here.
from sds-dust-sensors-arduino-library.
It seems that https://github.com/karlchen86/SDS011 library does not exist anymore or it is not public anymore.
from sds-dust-sensors-arduino-library.
Thanks
I think we can close close this issue now
from sds-dust-sensors-arduino-library.
Related Issues (20)
- Invalid firmware version HOT 4
- Compiling error HOT 1
- SoftwareSerial library api change HOT 1
- Issue with The Things Uno (LoraWAN Leonardo). HOT 12
- Incompatibility with SD.h HOT 6
- Query mode example missing evry other reading HOT 2
- Output values unit HOT 2
- Query reporting mode HOT 1
- Add esp32 to the SoftwareSerial.h #ifdef
- Compilation fails with SoftwareSerial.h not found. Library.json version doesn't match tag 1.4.0? HOT 4
- Examples have reversed arguments HOT 1
- Compilation fails on Arduino Nano 33 BLE (Sense) HOT 3
- ESP32 hardware serial UART2 HOT 1
- Could you tell me why this did not work with board MKR WIFI 1010? HOT 1
- WakingUp HOT 1
- sds011 stuck in custom mode HOT 1
- Using hardwareserial crashing in sds.begin() on arduino-espressif32 framework HOT 2
- invalid initialization of non-const reference of type 'HardwareSerial&' , sds(rxPin, txPin); HOT 2
- Error on linking: undefined reference to `vtable for Serials::AbstractSerial' HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sds-dust-sensors-arduino-library.