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

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