GithubHelp home page GithubHelp logo

Comments (5)

lewapek avatar lewapek commented on June 10, 2024

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.

thomasmeeus avatar thomasmeeus commented on June 10, 2024

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.

lewapek avatar lewapek commented on June 10, 2024

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.

taunoe avatar taunoe commented on June 10, 2024

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.

lewapek avatar lewapek commented on June 10, 2024

Thanks
I think we can close close this issue now

from sds-dust-sensors-arduino-library.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.