MajicDesigns / MD_Parola

Library for modular scrolling LED matrix text displays
GNU Lesser General Public License v2.1
438 stars 135 forks source link

Wrong Week's Day #48

Closed Dancopy closed 5 years ago

Dancopy commented 5 years ago

Greetings Marco! I'm using your 'Parola_Zone_TimeMsg' sketch; I loaded a sketch 'DS3231_Serial_Easy' on the DS3231 RTC to set the time, and when I record the sketch, shows the correct time and date on the display, but Day of the Week is wrong, for example, today (I recorded the sketch) "Sunday, April 21, 2019" is showing "Saturday, April 21, 2019". Would you have any tips for me? NOTE: On Serial Monitor shows correct: Sunday, April 21, 2019 Thank you very much

MajicDesigns commented 5 years ago

I loaded a sketch 'DS3231_Serial_Easy' on the DS3231 RTC

I have no idea what this sketch is or what it does.

The DoW on the DS3231 is an arbitrary number cycling between 1 and 7. The meaning of the DoW is in your code (Monday could be 3, it does not matter to the DS3231). The Parola sketch assigned the label for the day according to the table static const char str[][10] PROGMEM = { "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" }; In this table Sunday is DoW 1. If you want a different mapping change the table.

Dancopy commented 5 years ago

I thought the sketch was his own. Ok; In the DS3231.cpp file, the table starts on Monday and ends on Sunday and the sketch starts on Sunday and ends on Saturday, so I fixed this in the sketch. Thank you for the tip.