Skip to content

Commit cd509c8

Browse files
authored
fix: changes the code to actually connect to the WiFi in roder to get time and date
1 parent 4f41577 commit cd509c8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libraries/ESP32/examples/Time/SimpleTime/SimpleTime.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ void setup()
3333
{
3434
Serial.begin(115200);
3535

36-
// configure WiFi
37-
WiFi.mode(WIFI_STA);
36+
// configure WiFi STA and connect in order to get the current time and date.
37+
WiFi.begin(ssid, password);
3838

3939
// set notification call-back function
4040
sntp_set_time_sync_notification_cb( timeavailable );

0 commit comments

Comments
 (0)