File tree Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Original file line number Diff line number Diff line change 88
99#include " index_htm.h"
1010#include " logs_htm.h"
11+ #include " wifi_credentials.h" // change your WiFi settings in this file
1112
1213#define ONE_WIRE_BUS D1
14+ #define ONBOARD_LED D4
1315
1416#define TZ 1 // (utc+) TZ in hours
1517#define DST_MN 60 // use 60mn for summer time in some countries
1618#define TZ_MN ((TZ)*60 )
1719#define TZ_SEC ((TZ)*3600 )
1820#define DST_SEC ((DST_MN)*60 )
1921
20- const char WIFISSID[] = " yourSSID" ;
21- const char WIFIPSK[] = " yourPSK" ;
22-
23- const uint8_t ONBOARD_LED = 2 ;
2422const float SENSOR_ERROR = -273.15 ;
2523
26- AsyncWebServer server (80 );
27-
2824float currentTemp = SENSOR_ERROR;
2925bool dstStatus = true ;
3026
@@ -40,7 +36,10 @@ void setup(void)
4036 WiFi.mode ( WIFI_STA );
4137 if ( !connectWifi () )
4238 {
43- Serial.println ( " No WiFi!" );
39+ Serial.println ( " No WiFi! Check 'wifi_credentials.h'" );
40+ delay (100 );
41+ Serial.end ();
42+ pinMode ( ONBOARD_LED, OUTPUT );
4443 while ( true )
4544 {
4645 digitalWrite ( ONBOARD_LED, LOW );
@@ -52,6 +51,7 @@ void setup(void)
5251
5352 Serial.println ( WiFi.localIP ().toString () );
5453
54+ static AsyncWebServer server (80 );
5555 static const char * HTML_HEADER = " text/html" ;
5656
5757 server.on ( " /" , HTTP_GET, [] ( AsyncWebServerRequest * request )
Original file line number Diff line number Diff line change 1+ #define WIFISSID "yourSSID"
2+ #define WIFIPSK "yourPSK"
3+
You can’t perform that action at this time.
0 commit comments