一切正常,但大约24小时后,显示屏仅亮起,但不显示任何文本。有什么建议吗?我通过按下按钮重置tx变量,其类型为unsigned long tx;
if(digitalRead(6) == LOW && millis()-pressed >= 1000){
tx = millis();
}
if (millis() - tx < 60000) {
// LCD displays stops every 10 minutes
// (600000 milli seconds) (1 minute 60000 mili seconds)
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Temp: " + String(temperature));
lcd.setCursor(0, 1);
lcd.print("T1: " + String(t1) + " H T2: " + String(t2) + " M");
digitalWrite(BACKLIGHT,HIGH);
}
else
{
lcd.clear();
digitalWrite(BACKLIGHT,LOW);
//Nodata on display
}
答案 0 :(得分:0)
此代码可以正常工作,结果证明接地电缆连接不良。