I am new to arduino so sorry for any mistakes in terms of framing of question and the coding in general.
I am looking to create a device that measures airflow, humidity, and particulate matter. I've blocked out the majority of the code so i can test parts in segments, but I'm running into this one error "error compiling for board arduino uno".
Any help is greatly appreciated.
I have edited the code and removed the excess.
//measuring airflow
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 16, 4);
float CurrentReading;
float Sum;
float Average;
float MeasuresN = 2500 ; // number of measures to average
float Flow;
void setup()
{
//measuring airflow
Serial.begin(9600);
lcd.begin(16, 4);
}
void loop()
{
//measuring airflow
for (int i = 0; i < MeasuresN; i++)
{
CurrentReading = analogRead(A0);
Sum += CurrentReading;
delay(1);
}
Average = Sum / MeasuresN;
Sum = 0;
// To proper measure from 0 m/s airspeed you will need to find curve equation based on your application- I use linear equation to test on fan I had access to.
////////////////////////////
Flow = (Average - 68) * 0.265 + 2.7;
////////////////////////////
lcd.backlight();
lcd.setCursor(0, 0);
lcd.print("Sensor:"); lcd.print(Average);
lcd.setCursor(0, 1);
lcd.print("Airflow:"); lcd.print(Flow); lcd.print("m/s ");
delay(5);
}
Yes, I've commented out most of the code because I wanted to work in parts and resolve the code one bit at a time. The code has three components 1.Airflow 2. Humidity/Temperature 3. Particulate Matter. I am working to resolve the airflow before moving further.