mirror of
https://github.com/miguel5612/MQSensorsLib.git
synced 2025-03-15 05:17:30 +03:00
Fixed calibration calculation issue
This commit is contained in:
parent
fce223342f
commit
80af739dfd
@ -48,7 +48,7 @@ void setup() {
|
||||
// Acknowledgements: https://jayconsystems.com/blog/understanding-a-gas-sensor
|
||||
Serial.print("Calibrating please wait.");
|
||||
float calcR0 = 0;
|
||||
for(int i = 0; i<=10; i ++)
|
||||
for(int i = 1; i<=10; i ++)
|
||||
{
|
||||
MQ4.update(); // Update data, the arduino will be read the voltage on the analog pin
|
||||
calcR0 += MQ4.calibrate(RatioMQ4CleanAir);
|
||||
|
@ -58,7 +58,7 @@ void setup() {
|
||||
// Acknowledgements: https://jayconsystems.com/blog/understanding-a-gas-sensor
|
||||
Serial.print("Calibrating please wait.");
|
||||
float calcR0 = 0;
|
||||
for(int i = 0; i<=10; i ++)
|
||||
for(int i = 1; i<=10; i ++)
|
||||
{
|
||||
MQ131.update(); // Update data, the arduino will be read the voltage on the analog pin
|
||||
calcR0 += MQ131.calibrate(RatioMQ131CleanAir);
|
||||
|
@ -61,7 +61,7 @@ void setup() {
|
||||
// Acknowledgements: https://jayconsystems.com/blog/understanding-a-gas-sensor
|
||||
Serial.print("Calibrating please wait.");
|
||||
float calcR0 = 0;
|
||||
for(int i = 0; i<=10; i ++)
|
||||
for(int i = 1; i<=10; i ++)
|
||||
{
|
||||
MQ135.update(); // Update data, the arduino will be read the voltage on the analog pin
|
||||
calcR0 += MQ135.calibrate(RatioMQ135CleanAir);
|
||||
|
@ -57,7 +57,7 @@ void setup() {
|
||||
// Acknowledgements: https://jayconsystems.com/blog/understanding-a-gas-sensor
|
||||
Serial.print("Calibrating please wait.");
|
||||
float calcR0 = 0;
|
||||
for(int i = 0; i<=10; i ++)
|
||||
for(int i = 1; i<=10; i ++)
|
||||
{
|
||||
MQ2.update(); // Update data, the arduino will be read the voltage on the analog pin
|
||||
calcR0 += MQ2.calibrate(RatioMQ2CleanAir);
|
||||
|
@ -60,7 +60,7 @@ void setup() {
|
||||
// Acknowledgements: https://jayconsystems.com/blog/understanding-a-gas-sensor
|
||||
Serial.print("Calibrating please wait.");
|
||||
float calcR0 = 0;
|
||||
for(int i = 0; i<=10; i ++)
|
||||
for(int i = 1; i<=10; i ++)
|
||||
{
|
||||
MQ3.update(); // Update data, the arduino will be read the voltage on the analog pin
|
||||
calcR0 += MQ3.calibrate(RatioMQ3CleanAir);
|
||||
|
@ -58,7 +58,7 @@ void setup() {
|
||||
// Acknowledgements: https://jayconsystems.com/blog/understanding-a-gas-sensor
|
||||
Serial.print("Calibrating please wait.");
|
||||
float calcR0 = 0;
|
||||
for(int i = 0; i<=10; i ++)
|
||||
for(int i = 1; i<=10; i ++)
|
||||
{
|
||||
MQ303.update(); // Update data, the arduino will be read the voltage on the analog pin
|
||||
calcR0 += MQ303.calibrate(RatioMQ303CleanAir);
|
||||
|
@ -59,7 +59,7 @@ void setup() {
|
||||
// Acknowledgements: https://jayconsystems.com/blog/understanding-a-gas-sensor
|
||||
Serial.print("Calibrating please wait.");
|
||||
float calcR0 = 0;
|
||||
for(int i = 0; i<=10; i ++)
|
||||
for(int i = 1; i<=10; i ++)
|
||||
{
|
||||
MQ309.update(); // Update data, the arduino will be read the voltage on the analog pin
|
||||
calcR0 += MQ309.calibrate(RatioMQ309CleanAir);
|
||||
|
@ -50,7 +50,7 @@ void setup() {
|
||||
// Acknowledgements: https://jayconsystems.com/blog/understanding-a-gas-sensor
|
||||
Serial.print("Calibrating please wait.");
|
||||
float calcR0 = 0;
|
||||
for(int i = 0; i<=10; i ++)
|
||||
for(int i = 1; i<=10; i ++)
|
||||
{
|
||||
MQ4.update(); // Update data, the arduino will be read the voltage on the analog pin
|
||||
calcR0 += MQ4.calibrate(RatioMQ4CleanAir);
|
||||
|
@ -50,7 +50,7 @@ void setup() {
|
||||
// Acknowledgements: https://jayconsystems.com/blog/understanding-a-gas-sensor
|
||||
Serial.print("Calibrating please wait.");
|
||||
float calcR0 = 0;
|
||||
for(int i = 0; i<=10; i ++)
|
||||
for(int i = 1; i<=10; i ++)
|
||||
{
|
||||
MQ4.update(); // Update data, the arduino will be read the voltage on the analog pin
|
||||
calcR0 += MQ4.calibrate(RatioMQ4CleanAir);
|
||||
|
@ -60,7 +60,7 @@ void setup() {
|
||||
// Acknowledgements: https://jayconsystems.com/blog/understanding-a-gas-sensor
|
||||
Serial.print("Calibrating please wait.");
|
||||
float calcR0 = 0;
|
||||
for(int i = 0; i<=10; i ++)
|
||||
for(int i = 1; i<=10; i ++)
|
||||
{
|
||||
MQ4.update(); // Update data, the arduino will be read the voltage on the analog pin
|
||||
calcR0 += MQ4.calibrate(RatioMQ4CleanAir);
|
||||
|
@ -59,7 +59,7 @@ void setup() {
|
||||
// Acknowledgements: https://jayconsystems.com/blog/understanding-a-gas-sensor
|
||||
Serial.print("Calibrating please wait.");
|
||||
float calcR0 = 0;
|
||||
for(int i = 0; i<=10; i ++)
|
||||
for(int i = 1; i<=10; i ++)
|
||||
{
|
||||
MQ5.update(); // Update data, the arduino will be read the voltage on the analog pin
|
||||
calcR0 += MQ5.calibrate(RatioMQ5CleanAir);
|
||||
|
@ -59,7 +59,7 @@ void setup() {
|
||||
// Acknowledgements: https://jayconsystems.com/blog/understanding-a-gas-sensor
|
||||
Serial.print("Calibrating please wait.");
|
||||
float calcR0 = 0;
|
||||
for(int i = 0; i<=10; i ++)
|
||||
for(int i = 1; i<=10; i ++)
|
||||
{
|
||||
MQ6.update(); // Update data, the arduino will be read the voltage on the analog pin
|
||||
calcR0 += MQ6.calibrate(RatioMQ6CleanAir);
|
||||
|
@ -60,7 +60,7 @@ void setup() {
|
||||
// Acknowledgements: https://jayconsystems.com/blog/understanding-a-gas-sensor
|
||||
Serial.print("Calibrating please wait.");
|
||||
float calcR0 = 0;
|
||||
for(int i = 0; i<=10; i ++)
|
||||
for(int i = 1; i<=10; i ++)
|
||||
{
|
||||
MQ7.update(); // Update data, the arduino will be read the voltage on the analog pin
|
||||
calcR0 += MQ7.calibrate(RatioMQ7CleanAir);
|
||||
|
@ -60,7 +60,7 @@ void setup() {
|
||||
// Acknowledgements: https://jayconsystems.com/blog/understanding-a-gas-sensor
|
||||
Serial.print("Calibrating please wait.");
|
||||
float calcR0 = 0;
|
||||
for(int i = 0; i<=10; i ++)
|
||||
for(int i = 1; i<=10; i ++)
|
||||
{
|
||||
MQ8.update(); // Update data, the arduino will be read the voltage on the analog pin
|
||||
calcR0 += MQ8.calibrate(RatioMQ8CleanAir);
|
||||
|
@ -49,7 +49,7 @@ void setup() {
|
||||
// Acknowledgements: https://jayconsystems.com/blog/understanding-a-gas-sensor
|
||||
Serial.print("Calibrating please wait.");
|
||||
float calcR0 = 0;
|
||||
for(int i = 0; i<=10; i ++)
|
||||
for(int i = 1; i<=10; i ++)
|
||||
{
|
||||
MQ9.update(); // Update data, the arduino will be read the voltage on the analog pin
|
||||
calcR0 += MQ9.calibrate(RatioMQ9CleanAir);
|
||||
|
@ -58,7 +58,7 @@ void setup() {
|
||||
// Acknowledgements: https://jayconsystems.com/blog/understanding-a-gas-sensor
|
||||
Serial.print("Calibrating please wait.");
|
||||
float calcR0 = 0;
|
||||
for(int i = 0; i<=10; i ++)
|
||||
for(int i = 1; i<=10; i ++)
|
||||
{
|
||||
MQ9.update(); // Update data, the arduino will be read the voltage on the analog pin
|
||||
calcR0 += MQ9.calibrate(RatioMQ9CleanAir);
|
||||
|
@ -109,7 +109,7 @@ void setup() {
|
||||
MQ7calcR0 = 0,
|
||||
MQ8calcR0 = 0,
|
||||
MQ9calcR0 = 0;
|
||||
for(int i = 0; i<=20; i ++)
|
||||
for(int i = 1; i<=10; i ++)
|
||||
{
|
||||
//Update the voltage lectures
|
||||
MQ2.update();
|
||||
|
@ -57,7 +57,7 @@ void setup() {
|
||||
// Acknowledgements: https://jayconsystems.com/blog/understanding-a-gas-sensor
|
||||
Serial.print("Calibrating please wait.");
|
||||
float calcR0 = 0;
|
||||
for(int i = 0; i<=10; i ++)
|
||||
for(int i = 1; i<=10; i ++)
|
||||
{
|
||||
MQ4.update(); // Update data, the arduino will be read the voltage on the analog pin
|
||||
calcR0 += MQ4.calibrate(RatioMQ4CleanAir);
|
||||
|
Loading…
x
Reference in New Issue
Block a user