Updated examples, added calibration option into program Commented

This commit is contained in:
miguel5612
2019-08-15 09:02:38 -05:00
parent 3ae7b6b1b3
commit 1d4ad83f22
13 changed files with 145 additions and 1 deletions

View File

@ -21,6 +21,7 @@
//Definitions
#define pin A0 //Analog input 0 of your arduino
#define type 7 //MQ7
//#define calibration_button 13 //Pin to calibrate your sensor
//Declare Sensor
@ -38,10 +39,19 @@ void setup() {
Remarks: This function create the sensor object.
************************************************************************************/
MQ7.inicializar();
//pinMode(calibration_button, INPUT);
}
void loop() {
MQ7.update(); // Update data, the arduino will be read the voltaje in the analog pin
/*
//Rutina de calibracion - Uncomment if you need (setup too and header)
if(calibration_button)
{
float R0 = MQ7.calibrate();
MQ7.setR0(R0):
}
*/
/***************************** MQReadSensor ****************************************
Input: Gas - Serial print flag
Output: Value in PPM