mirror of
https://github.com/miguel5612/MQSensorsLib.git
synced 2025-07-02 02:11:04 +03:00
Fixed calibration calculation issue
This commit is contained in:
@ -57,7 +57,7 @@ void setup() {
|
||||
// Acknowledgements: https://jayconsystems.com/blog/understanding-a-gas-sensor
|
||||
Serial.print("Calibrating please wait.");
|
||||
float calcR0 = 0;
|
||||
for(int i = 0; i<=10; i ++)
|
||||
for(int i = 1; i<=10; i ++)
|
||||
{
|
||||
MQ2.update(); // Update data, the arduino will be read the voltage on the analog pin
|
||||
calcR0 += MQ2.calibrate(RatioMQ2CleanAir);
|
||||
|
Reference in New Issue
Block a user