diff --git a/include/hasp_conf.h b/include/hasp_conf.h index b4a8fe52..4714335e 100644 --- a/include/hasp_conf.h +++ b/include/hasp_conf.h @@ -12,6 +12,8 @@ #define HASP_USE_EEPROM 0 #define HASP_USE_SDCARD 0 +#define HASP_USE_BUTTON 1 + #define HASP_USE_QRCODE 1 #define HASP_USE_PNGDECODE 0 diff --git a/src/main.cpp b/src/main.cpp index 82f643fe..0bba396b 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -39,6 +39,10 @@ #include "hasp_mdns.h" #endif +#if HASP_USE_BUTTON +#include "hasp_button.h" +#endif + bool isConnected; void setup() @@ -83,6 +87,10 @@ void setup() httpSetup(settings[F("http")]); #endif +#if HASP_USE_BUTTON + buttonSetup(); +#endif + // otaSetup(settings[F("ota")]); #endif } @@ -123,6 +131,10 @@ void loop() mdnsLoop(isConnected); #endif +#if HASP_USE_BUTTON + buttonLoop(); +#endif + // otaLoop(wifiIsConnected); #endif