From 60d02d88b5e9390c0722e2f7b72d5aabac8eec04 Mon Sep 17 00:00:00 2001 From: Phat Nguyen Date: Wed, 7 Feb 2024 09:43:52 +0700 Subject: [PATCH 1/2] Update show device id on 4 line of display --- examples/BASIC_v4/BASIC_v4.ino | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/examples/BASIC_v4/BASIC_v4.ino b/examples/BASIC_v4/BASIC_v4.ino index dd96b3a..83b356f 100644 --- a/examples/BASIC_v4/BASIC_v4.ino +++ b/examples/BASIC_v4/BASIC_v4.ino @@ -413,7 +413,21 @@ void setup() { } /** Show display */ - displayShowText("Warm Up", "Serial#", String(ESP.getChipId(), HEX)); + // displayShowText("Warm Up", "Serial#", String(ESP.getChipId(), HEX)); + ag.display.clear(); + ag.display.setCursor(1, 1); + ag.display.setText("Warn Up"); + ag.display.setCursor(1, 17); + ag.display.setText("Serial#"); + ag.display.setCursor(1, 29); + String id = getNormalizedMac(); + String id1 = id.substring(0, 8); + String id2 = id.substring(9, 12); + ag.display.setText("\'"+ id1); + ag.display.setCursor(1, 40); + ag.display.setText(id2 + "\'"); + ag.display.show(); + delay(DISPLAY_DELAY_SHOW_CONTENT_MS); } From ab600e014af0589cf43908254c8ee554be0a25cc Mon Sep 17 00:00:00 2001 From: Phat Nguyen Date: Wed, 7 Feb 2024 21:00:13 +0700 Subject: [PATCH 2/2] Update content and line space of display show serial number value --- examples/BASIC_v4/BASIC_v4.ino | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/examples/BASIC_v4/BASIC_v4.ino b/examples/BASIC_v4/BASIC_v4.ino index 83b356f..c816ab4 100644 --- a/examples/BASIC_v4/BASIC_v4.ino +++ b/examples/BASIC_v4/BASIC_v4.ino @@ -412,23 +412,23 @@ void setup() { } } - /** Show display */ - // displayShowText("Warm Up", "Serial#", String(ESP.getChipId(), HEX)); + /** Show serial number display */ ag.display.clear(); ag.display.setCursor(1, 1); - ag.display.setText("Warn Up"); - ag.display.setCursor(1, 17); + ag.display.setText("Warm Up"); + ag.display.setCursor(1, 15); ag.display.setText("Serial#"); ag.display.setCursor(1, 29); String id = getNormalizedMac(); - String id1 = id.substring(0, 8); + Serial.println("Device id: " + id); + String id1 = id.substring(0, 9); String id2 = id.substring(9, 12); ag.display.setText("\'"+ id1); ag.display.setCursor(1, 40); ag.display.setText(id2 + "\'"); ag.display.show(); - delay(DISPLAY_DELAY_SHOW_CONTENT_MS); + delay(5000); } void loop() {