From be742caa46fc678cd051db31dd2b9a35181c6fc1 Mon Sep 17 00:00:00 2001 From: lash21 Date: Fri, 30 Oct 2026 15:01:29 +0100 Subject: [PATCH] message show on screen --- inos/Smart-Watch/Smart-Watch.ino | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/inos/Smart-Watch/Smart-Watch.ino b/inos/Smart-Watch/Smart-Watch.ino index 9e2bdc3..bec3076 100644 --- a/inos/Smart-Watch/Smart-Watch.ino +++ b/inos/Smart-Watch/Smart-Watch.ino @@ -6,6 +6,8 @@ #include #include +#include + #define TFT_DC D7 #define TFT_RST D9 @@ -15,7 +17,9 @@ unsigned long HOUR=0; unsigned long DAY=0; unsigned long MONTH=0; -unsigned long YEAR=2026; +unsigned long YEAR=20; + +String message = ""; unsigned long preMil = 0; const long interval = 1000; @@ -57,6 +61,7 @@ class CharacteristicCallbacks: public BLECharacteristicCallbacks { } if (pCharacteristic->getUUID().equals(BLEUUID(CHAR_MESSAGE_UUID))) { Serial.print("Message Recived: "); + message = value; Serial.println(value); } } @@ -104,6 +109,9 @@ void loop() { gfx->setCursor(20, 80); gfx->printf("Date: %02d.%02d.%04d\n", DAY, MONTH, YEAR); + gfx->setCursor(20, 110); + gfx->printf("message: %s", message); + timeChanged = false; }