mirror of
https://github.com/miguel5612/MQSensorsLib.git
synced 2025-07-04 03:11:03 +03:00
Fixed issue on calibratioN
This commit is contained in:
@ -52,7 +52,14 @@ void setup() {
|
||||
Ethanol | 3.4916 | -2.432
|
||||
*/
|
||||
|
||||
|
||||
/***************************** MQ Init ********************************************/
|
||||
//Remarks: Configure the pin of arduino as input.
|
||||
/************************************************************************************/
|
||||
MQ303.init();
|
||||
/*
|
||||
//If the RL value is different from 10K please assign your RL value with the following method:
|
||||
MQ303.setRL(10);
|
||||
*/
|
||||
/***************************** MQ CAlibration ********************************************/
|
||||
// Explanation:
|
||||
// In this routine the sensor will measure the resistance of the sensor supposing before was pre-heated
|
||||
@ -74,21 +81,6 @@ void setup() {
|
||||
if(isinf(calcR0)) {Serial.println("Warning: Conection issue founded, R0 is infite (Open circuit detected) please check your wiring and supply"); while(1);}
|
||||
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:
|
||||
MQ303.setRL(10);
|
||||
*/
|
||||
|
||||
/***************************** MQ Init ********************************************/
|
||||
//Remarks: Configure the pin of arduino as input.
|
||||
/************************************************************************************/
|
||||
MQ303.init();
|
||||
/***************************** 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.
|
||||
/************************************************************************************/
|
||||
MQ303.serialDebug(true);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user