Fixed calibration

This commit is contained in:
miguel5612
2019-05-30 13:49:50 -05:00
parent e848e505b0
commit b69d85d6be
4 changed files with 17 additions and 14 deletions

View File

@ -527,7 +527,7 @@ int MQUnifiedsensor::readPPM(int m, int b) {
double ppm = pow(10, ppm_log); //Convert ppm value to log scale
return floor(ppm);
}
int MQUnifiedsensor::calibrate(boolean print) {
float MQUnifiedsensor::calibrate(boolean print) {
//More explained in: https://jayconsystems.com/blog/understanding-a-gas-sensor
/*
V = I x R

View File

@ -274,7 +274,7 @@ class MQUnifiedsensor
int readSensor(String nameLectureRequeired = "", bool print = false);
int readPPM(int m, int b);
int calibrate(boolean print = false);
float calibrate(boolean print = false);
double getVoltage();
double stringToDouble(String & str);