Fork of the excellent esp8266-react - https://github.com/rjwats/esp8266-react
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
336 B
17 lines
336 B
#ifndef ESPUtils_h
|
|
#define ESPUtils_h
|
|
|
|
#include <Arduino.h>
|
|
|
|
class ESPUtils {
|
|
public:
|
|
static String defaultDeviceValue(String prefix = "") {
|
|
#ifdef ESP32
|
|
return prefix + String((unsigned long)ESP.getEfuseMac(), HEX);
|
|
#elif defined(ESP8266)
|
|
return prefix + String(ESP.getChipId(), HEX);
|
|
#endif
|
|
}
|
|
};
|
|
|
|
#endif // end ESPUtils
|