Fixed calibration calculation issue

This commit is contained in:
miguel5612 2020-03-29 15:51:54 -05:00
parent fce223342f
commit 80af739dfd
18 changed files with 18 additions and 18 deletions

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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();

View File

@ -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);