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
2 out of 2
Suggested Topics
-
Day 1 - Status report
Announcements • 23 Mar 2014, 22:45 • hek 24 Mar 2014, 20:12 -
NODs stop responding, but ping works.
Troubleshooting • about 14 hours ago • Marcin about 14 hours ago -
Getting system time from the controller
Troubleshooting • 10 days ago • dpcons 6 days ago -
Compiling Sensor code using BME280 and ESP8266
Troubleshooting • 11 days ago • dpcons 11 days ago -
Raspberry Pi 5: invalid GPIO 9
Troubleshooting • 27 Aug 2024, 13:20 • igo 27 Aug 2024, 13:20 -
Can not compile MySensors on esp8266
Troubleshooting • 24 Aug 2024, 15:35 • TheoL 29 Aug 2024, 20:47