From 91bfad1049d189ddbc531b5c8e11bf1a2a9a4a37 Mon Sep 17 00:00:00 2001 From: strawmanbobi Date: Fri, 26 Dec 2025 10:02:17 +0800 Subject: [PATCH] made progress on android-example connecting to arduino-example --- arduino-example/src/configure.h | 4 ++-- arduino-example/src/main.cpp | 11 ++++++++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/arduino-example/src/configure.h b/arduino-example/src/configure.h index ef4fc6e..0af8e8d 100644 --- a/arduino-example/src/configure.h +++ b/arduino-example/src/configure.h @@ -27,8 +27,8 @@ #include // Wi-Fi Configs -#define SECRET_SSID "maomao" -#define SECRET_PASS "20121207" +#define SECRET_SSID "Maomao的小房子" +#define SECRET_PASS "Maomao121207" // LED Matrix Definitions constexpr uint32_t chip[] = { diff --git a/arduino-example/src/main.cpp b/arduino-example/src/main.cpp index cf75c28..b8446e2 100644 --- a/arduino-example/src/main.cpp +++ b/arduino-example/src/main.cpp @@ -36,6 +36,15 @@ constexpr char ssid[] = SECRET_SSID; constexpr char pass[] = SECRET_PASS; +// commands and events +auto *aHello = "a_hello"; +auto *eHello = "e_hello"; +auto *aBin = "a_bin"; +auto *eBin = "e_bin"; +auto *aControl = "a_control"; +auto *eControl = "e_control"; + + int status = WL_IDLE_STATUS; unsigned long lastStatusCheck = 0; boolean wifiStatusPrinted = false; @@ -133,7 +142,7 @@ void loop() { if (false == clientConnected) { client.flush(); Serial.println("We have a new client"); - client.println("Hello, client"); + client.println("e_hello"); clientConnected = true; }