MQTT messages. Button anleren, Wifi frontend

This commit is contained in:
Carsten Graf
2025-06-05 23:34:11 +02:00
parent 3b4f63f072
commit e0d3031d6f
10 changed files with 269 additions and 114 deletions

10
src/helper.h Normal file
View File

@@ -0,0 +1,10 @@
#pragma once
#include <Arduino.h>
#include "master.h"
std::array<uint8_t, 6> macStringToBytes(const char* macStr) {
std::array<uint8_t, 6> bytes;
sscanf(macStr, "%hhx:%hhx:%hhx:%hhx:%hhx:%hhx",
&bytes[0], &bytes[1], &bytes[2], &bytes[3], &bytes[4], &bytes[5]);
return bytes;
}