I use Delay mainly for LCD (1602) to display text long enough. But then the push button doesn't work ![]()
void loop() {
Reload = digitalRead(RELOAD_DATA_PIN);
if (Reload == HIGH)
{
// something will be done
}
// every 1 minutes
if (millis() - timeMinute >= 60000 || timeMinute == 0) {
timeMinute = millis();
Pressure = bme280.getPressure();
lcd.clear();
lcd.print("BME280 pressure:");
lcd.setCursor(0, 1);
lcd.print(Pressure);
delay(3000);
Temp = sht.getTemperature();
lcd.clear();
lcd.print("SHT3x temp:");
lcd.setCursor(0, 1);
lcd.print(Temp);
delay(3000);
}
} // loop