08-09-2018, 20:07
Hi jarekh3,
In first place, try to enable the NTP debug options by uncommented the line as show below:
What you get on the serial monitor?
You can also enable the PRINT_DEBUG_WIFI options to check if you are getting WiFi connection, otherwise the NTP will not work.
Next check your auto summer time settings, here:
There is also another way you could try to force the clock to sync:
On the examples folder of the RTClib library, there is a sketch called ds3231.ino, compile it and upload to your Meduino. Your clock should be working correctly now.
In first place, try to enable the NTP debug options by uncommented the line as show below:
Code:
// --------------------------------------------------------------------------------------
// Debug helper
// --------------------------------------------------------------------------------------
//#define PRINT_DEBUG_WIFI
#define PRINT_DEBUG_NTP_UPDATE // Prints to serial monitor messages related to sync time with NTP serverWhat you get on the serial monitor?
You can also enable the PRINT_DEBUG_WIFI options to check if you are getting WiFi connection, otherwise the NTP will not work.
Next check your auto summer time settings, here:
Code:
// --------------------------------------------------------------------------------------
// Define rules for Auto Summer Time Display, and clock adjustment
// --------------------------------------------------------------------------------------
// Example for Australia Eastern Time Zone (Sydney, Melbourne)
// TimeChangeRule aEDT = {"AEDT", First, Sun, Oct, 2, 660}; //UTC + 11 hours
// TimeChangeRule aEST = {"AEST", First, Sun, Apr, 3, 600}; //UTC + 10 hours
// Timezone myTZ(aEDT, aEST);
TimeChangeRule PST = {"PST", Last, Sun, Mar, 1, 60}; //Portuguese Summer Time - "UTC + 1" or GMT + 1
TimeChangeRule GMT = {"GMT", Last, Sun, Oct, 2, 0}; //Portuguese Winter Time - "UTC + 0" or GMT
Timezone myTZ(PST, GMT);There is also another way you could try to force the clock to sync:
On the examples folder of the RTClib library, there is a sketch called ds3231.ino, compile it and upload to your Meduino. Your clock should be working correctly now.

