Possible mistake in the code of the exemple DustSensorDSM
-
The code shows that the concentration can be calculated by the expression:
long concentration = 1.1pow(ratio,3)-3.8pow(ratio,2)+520ratio+0.62; // using spec sheet curve
But the sheet curve, as we can see in the graph, we have the concentration in the x axis, not in y as in the code:
ratio= 1.1pow(ratio,3)-3.8pow(ratio,2)+520ratio+0.62
I didn't understand why, in every code i see of this sensor, is the same. Can someone explain?
If it is a dumb question, sorry, but help me please.
The graph of data sheet.

@epierre -
Corrections of the post:
ratio= 1.1pow(concentrarion,3)-3.8pow(conccentration,2)+520*concentration+0.62
the graph

Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login