miguel5612 / MQSensorsLib

We present a unified library for MQ sensors, this library allows to read MQ signals easily from Arduino, Genuino, ESP8266, ESP-32 boards whose references are MQ2, MQ3, MQ4, MQ5, MQ6, MQ7, MQ8, MQ9, MQ131, MQ135, MQ136, MQ303A, MQ309A.
MIT License
169 stars 64 forks source link

Error in MQ4 sensor calibrating #19

Closed Dimitrah closed 4 years ago

Dimitrah commented 4 years ago

at examples/MQ-4/MQ-4.ino there is an error in the if function: //Rutina de calibracion - Uncomment if you need (setup too and header) if(calibration_button) { float R0 = MQ4.calibrate(); MQ4.setR0(R0); }

calibration_button=13 and so the if statement is always true. Instead of if(calibration_button) should be if(digitalRead(calibration_button==High)).

miguel5612 commented 4 years ago

Hello Dimitrah. We are processing your request, in the coming weeks we will be publishing the steps to implement the solution :). We appreciate your patience

miguel5612 commented 4 years ago

This was fixed on 2.0 version, please update and it will work well. image

If problem continues, please open a new issue