btclock_v3/src/lib/utils.cpp

12 lines
213 B
C++
Raw Normal View History

2023-11-08 11:18:59 +00:00
#include "utils.hpp"
int modulo(int x, int N)
{
return (x % N + N) % N;
}
String getMyHostname() {
byte mac[6];
WiFi.macAddress(mac);
return "btclock" + String(mac[4], 16) = String(mac[5], 16);
}