mirror of
https://github.com/miguel5612/MQSensorsLib.git
synced 2025-07-05 03:41:04 +03:00
Fixed issue on calibratioN
This commit is contained in:
@ -43,7 +43,14 @@ void setup() {
|
||||
MQ4.setRegressionMethod(1); //_PPM = a*ratio^b
|
||||
|
||||
|
||||
|
||||
/***************************** MQ Init ********************************************/
|
||||
//Remarks: Configure the pin of arduino as input.
|
||||
/************************************************************************************/
|
||||
MQ4.init();
|
||||
/*
|
||||
//If the RL value is different from 10K please assign your RL value with the following method:
|
||||
MQ4.setRL(10);
|
||||
*/
|
||||
/***************************** MQ CAlibration ********************************************/
|
||||
// Explanation:
|
||||
// In this routine the sensor will measure the resistance of the sensor supposing before was pre-heated
|
||||
@ -66,18 +73,6 @@ void setup() {
|
||||
if(calcR0 == 0){Serial.println("Warning: Conection issue founded, R0 is zero (Analog pin with short circuit to ground) please check your wiring and supply"); while(1);}
|
||||
/***************************** MQ CAlibration ********************************************/
|
||||
|
||||
/*
|
||||
//If the RL value is different from 10K please assign your RL value with the following method:
|
||||
MQ4.setRL(10);
|
||||
*/
|
||||
|
||||
/***************************** MQ Init ********************************************/
|
||||
//Input: setup flag, if this function are on setup will print the headers (Optional - Default value: False)
|
||||
//Output: print on serial port the information about sensor and sensor readings
|
||||
//Remarks: Configure the pin of arduino as input.
|
||||
/************************************************************************************/
|
||||
MQ4.init();
|
||||
|
||||
Serial.println("*************** Lectures from MQ-4 **********************");
|
||||
Serial.println("| LPG | CH4 | CO | Alcohol | Smoke |");
|
||||
}
|
||||
|
Reference in New Issue
Block a user