Hello!
First of all, I just want to say that not only am I new to Arduino, but I'm very bad at coding in general. So if you have any suggestions, I would very much appreciate as much detail and how-to info as you can offer.
What I have have is an Arduino UNO with a 20x4 I2C LCD display being fed information from various sensors to operate a automated greenhouse.
What I would like to do is prevent the screen from flashing by updating the LCD every few minutes without using the delay function, or to only update the parts of the screen displaying sensory inputs.
NOTE: I have the <RBD_Timer.h> library installed to control some of the other time-controlled functions such as shutting on/off LED strips, fans, and a water pump.
Here is the LCD function:
int LCD () {
//Activate & Read moisture sensors
digitalWrite(sensorVCC, HIGH);
sensorValue = analogRead(sensorPin);
sensorValue1 = analogRead(sensorPin1);
sensorValue2 = analogRead(sensorPin2);
sensorValue3 = analogRead(sensorPin3);
digitalWrite(sensorVCC, LOW);
//Check temp sensor
int chk = DHT.read11(DHT11_PIN);
//Print info on 20x4 LCD screen with I2C
lcd.begin (20,4);
lcd.setBacklightPin(BACKLIGHT_PIN,POSITIVE);
lcd.setBacklight(HIGH);
lcd.setCursor (8,0);
lcd.print ("GAEA");
lcd.setCursor(0,1);
lcd.print("Temp = ");
lcd.print(DHT.temperature);
lcd.print ("C");
lcd.setCursor(0,2);
lcd.print("Humidity = ");
lcd.print(DHT.humidity);
lcd.print ("%");
lcd.setCursor(0,3);
lcd.print("AVG. Moisture = ");
lcd.print((sensorValue1 + sensorValue2 + sensorValue3)/3);
}
Thank you!!