فهرست منبع

14-seg LED does not show anithing.

Vladimir N. Shilov 1 سال پیش
والد
کامیت
49eaa3c428
1فایلهای تغییر یافته به همراه8 افزوده شده و 4 حذف شده
  1. 8 4
      app/application.cpp

+ 8 - 4
app/application.cpp

@@ -80,9 +80,13 @@ void init(void) {
   if (display.begin(DEFAULT_ADDRESS) == false) {
     Serial.println("HT16K33 device did not acknowledge!");
   } else {
-	  Serial.println("HT16K33 displays acknowledged.");
+		if (display.initialize() != false) {
+		  Serial.println("HT16K33 displays acknowledged. Init OK");
+		} else {
+			Serial.println("HT16K33 displays acknowledged. Init FAIL");
+		}
 	}
-  display.print("Heaven");
+  display.print("1234");
 	tmpTimer.initializeMs(500, shiftStringLeft).start();
 
 	// refresh big led
@@ -94,7 +98,7 @@ void init(void) {
 
 	/* DHT22 */
 	dht.setup(DHT22_PIN, DHTesp::DHT22);
-	readTemperatureProcTimer.initializeMs(5 * 1000, onTimer_readDHT22).start(); // every so often.
+	readTemperatureProcTimer.initializeMs(30000, onTimer_readDHT22).start(); // every so often.
 }
 
 void showWatch(void) {
@@ -142,7 +146,7 @@ void showTime(void) {
 			// ...
 		} // new hour
 	} // new minute
-	TM1650_Out(dt.Hour>>4, dt.Hour&0xf, dt.Minute>>4, dt.Minute&0xf);
+	TM1650_Out(dt.Hour/10, dt.Hour%10, dt.Minute/10, dt.Minute%10);
 	TM1650_DotSet(Dig_2);
 	TM1650_DotSet(Dig_3);