Compare commits

...

1 Commits

Author SHA1 Message Date
Dmitry Frolov
88e1e8abc2 Fix formula in getResistance(): 5.0 is unnecessary here 2015-07-08 19:06:07 +06:00

View File

@ -52,7 +52,7 @@ float MQ135::getCorrectionFactor(float t, float h) {
/**************************************************************************/ /**************************************************************************/
float MQ135::getResistance() { float MQ135::getResistance() {
int val = analogRead(_pin); int val = analogRead(_pin);
return ((1023./(float)val) * 5. - 1.)*RLOAD; return ((1023./(float)val) - 1.)*RLOAD;
} }
/**************************************************************************/ /**************************************************************************/