mirror of
https://github.com/miguel5612/MQSensorsLib.git
synced 2025-03-15 05:17:30 +03:00
Updated example and created release
This commit is contained in:
parent
6ecc769676
commit
edd573ba0f
@ -23,13 +23,13 @@
|
|||||||
//Include the library
|
//Include the library
|
||||||
#include <MQUnifiedsensor.h>
|
#include <MQUnifiedsensor.h>
|
||||||
/************************Hardware Related Macros************************************/
|
/************************Hardware Related Macros************************************/
|
||||||
#define Board ("ESP-32")
|
#define Board ("ESP-32") // Wemos ESP-32 or other board, whatever have ESP32 core.
|
||||||
#define Pin (A0) //Analog input 3 of your arduino
|
#define Pin (25) //IO25 for your ESP32 WeMos Board, pinout here: https://i.pinimg.com/originals/66/9a/61/669a618d9435c702f4b67e12c40a11b8.jpg
|
||||||
/***********************Software Related Macros************************************/
|
/***********************Software Related Macros************************************/
|
||||||
#define Type ("MQ-3") //MQ3
|
#define Type ("MQ-3") //MQ3 or other MQ Sensor, if change this verify your a and b values.
|
||||||
#define Voltage_Resolution (3.3) // 3V3 <- IMPORTANT. Source: https://randomnerdtutorials.com/esp32-adc-analog-read-arduino-ide/
|
#define Voltage_Resolution (3.3) // 3V3 <- IMPORTANT. Source: https://randomnerdtutorials.com/esp32-adc-analog-read-arduino-ide/
|
||||||
#define ADC_Bit_Resolution (12) // ESP-32 bit resolution. Source: https://randomnerdtutorials.com/esp32-adc-analog-read-arduino-ide/
|
#define ADC_Bit_Resolution (12) // ESP-32 bit resolution. Source: https://randomnerdtutorials.com/esp32-adc-analog-read-arduino-ide/
|
||||||
#define RatioMQ3CleanAir (60)
|
#define RatioMQ3CleanAir (60) // Ratio of your sensor, for this example an MQ-3
|
||||||
/*****************************Globals***********************************************/
|
/*****************************Globals***********************************************/
|
||||||
MQUnifiedsensor MQ3(Board, Voltage_Resolution, ADC_Bit_Resolution, Pin, Type);
|
MQUnifiedsensor MQ3(Board, Voltage_Resolution, ADC_Bit_Resolution, Pin, Type);
|
||||||
/*****************************Globals***********************************************/
|
/*****************************Globals***********************************************/
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
name=MQUnifiedsensor
|
name=MQUnifiedsensor
|
||||||
version=2.0
|
version=2.0.1
|
||||||
author= Miguel Califa <miguelangel5612@gmail.com>, Yersson Carrillo<miguelangel5612@gmail.com>, Ghiordy Contreras<miguelangel5612@gmail.com>
|
author= Miguel Califa <miguelangel5612@gmail.com>, Yersson Carrillo<miguelangel5612@gmail.com>, Ghiordy Contreras<miguelangel5612@gmail.com>
|
||||||
maintainer= Miguel Califa <miguelangel5612@gmail.com>
|
maintainer= Miguel Califa <miguelangel5612@gmail.com>
|
||||||
sentence= This library allows you to read the MQ sensors very easily.
|
sentence= This library allows you to read the MQ sensors very easily.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user