15 #define PERSISTENT(v) persistent_ ## v 26 static const char ssid[] PROGMEM =
"Wi-Fi SSID";
27 static const uint8_t
mac[6] PROGMEM = { 0xde, 0xad, 0xbe, 0xef, 0xfe, 0xed };
37 Serial.println(F(
"Write default configuration"));
39 strcat_P(config.ssid,
ssid);
40 memcpy_P(config.mac,
mac,
sizeof(
mac));
46 Serial.println(F(
"Read configuration"));
50 Serial.print(millis() / 1000.0);
51 Serial.print(F(
":reset@"));
53 Serial.print(F(
" = "));
54 Serial.println(reset);
60 uint32_t start = millis();
63 Serial.print(start / 1000.0);
64 Serial.print(F(
":config@"));
66 Serial.print(F(
": timestamp = "));
67 Serial.print(config.timestamp);
68 Serial.print(F(
", ssid = \""));
69 Serial.print(config.ssid);
70 Serial.print(F(
"\", mac = "));
71 for (
size_t i = 0; i <
sizeof(config.mac); i++) {
72 Serial.print(config.mac[i], HEX);
73 if (i + 1 <
sizeof(config.mac)) Serial.print(
':');
77 uint32_t ms = millis() - start;
83 Serial.println(F(
"Update timestamp"));
87 sizeof(config.timestamp));