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

  1. #ifndef ESPUtils_h
  2. #define ESPUtils_h
  3. #include <Arduino.h>
  4. class ESPUtils {
  5. public:
  6. static String defaultDeviceValue(String prefix = "") {
  7. #ifdef ESP32
  8. return prefix + String((unsigned long)ESP.getEfuseMac(), HEX);
  9. #elif defined(ESP8266)
  10. return prefix + String(ESP.getChipId(), HEX);
  11. #endif
  12. }
  13. };
  14. #endif // end ESPUtils