Skip to content

Commit 483bd39

Browse files
committed
5.5.2 Fixed functions for getting time
rtcReadTime() function renamed to rtcGetRtcData() and examples renamed accordingly. Time variables are transfered to struct called date_time and are defined as a variable rtc_time. Now before getting any of time variables it is necessary to call function rtcGetRtcData(); so rtc can save data to rtc_time.
1 parent 66a0a26 commit 483bd39

File tree

19 files changed

+52
-56
lines changed

19 files changed

+52
-56
lines changed

examples/Inkplate10/Advanced_Inkplate_Features/Inkplate_RTC_Alarm_Example/Inkplate_RTC_Alarm_Example.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ void setup()
5959
int n = 0;
6060
void loop()
6161
{
62-
display.rtcReadTime(); // Get the time and date from RTC
62+
display.rtcGetRtcData(); // Get the time and date from RTC
6363
seconds = display.rtcGetSecond(); // Store senconds in a variable
6464
minutes = display.rtcGetMinute(); // Store minutes in a variable
6565
hour = display.rtcGetHour(); // Store hours in a variable

examples/Inkplate10/Advanced_Inkplate_Features/Inkplate_RTC_Basic_Example/Inkplate_RTC_Basic_Example.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ void setup()
4949
int n = 0;
5050
void loop()
5151
{
52-
display.rtcReadTime(); // Get the time and date from RTC
52+
display.rtcGetRtcData(); // Get the time and date from RTC
5353
seconds = display.rtcGetSecond(); // Store senconds in a variable
5454
minutes = display.rtcGetMinute(); // Store minutes in a variable
5555
hour = display.rtcGetHour(); // Store hours in a variable

examples/Inkplate10/Advanced_Inkplate_Features/Inkplate_RTC_Interrupt_Alarm_Example/Inkplate_RTC_Interrupt_Alarm_Example.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ void loop()
5555
{
5656
display.clearDisplay(); // Clear frame buffer of display
5757
display.setCursor(100, 100); // Set position of the text
58-
display.rtcReadTime(); // Get the time and date from RTC
58+
display.rtcGetRtcData(); // Get the time and date from RTC
5959

6060
// Print the time on screen
6161
printTime(display.rtcGetHour(), display.rtcGetMinute(), display.rtcGetSecond(), display.rtcGetDay(), display.rtcGetWeekday(), display.rtcGetMonth(), display.rtcGetYear());

examples/Inkplate10/Advanced_Inkplate_Features/Inkplate_RTC_Timer_Example/Inkplate_RTC_Timer_Example.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ void setup()
6969
int n = 0;
7070
void loop()
7171
{
72-
display.rtcReadTime(); // Get the time and date from RTC
72+
display.rtcGetRtcData(); // Get the time and date from RTC
7373
seconds = display.rtcGetSecond(); // Store senconds in a variable
7474
minutes = display.rtcGetMinute(); // Store minutes in a variable
7575
hour = display.rtcGetHour(); // Store hours in a variable

examples/Inkplate5/Advanced_Inkplate_Features/Inkplate_RTC_Alarm_Example/Inkplate_RTC_Alarm_Example.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ void setup()
5959
int n = 0;
6060
void loop()
6161
{
62-
display.rtcReadTime(); // Get the time and date from RTC
62+
display.rtcGetRtcData(); // Get the time and date from RTC
6363
seconds = display.rtcGetSecond(); // Store senconds in a variable
6464
minutes = display.rtcGetMinute(); // Store minutes in a variable
6565
hour = display.rtcGetHour(); // Store hours in a variable

examples/Inkplate5/Advanced_Inkplate_Features/Inkplate_RTC_Basic_Example/Inkplate_RTC_Basic_Example.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ void setup()
4949
int n = 0;
5050
void loop()
5151
{
52-
display.rtcReadTime(); // Get the time and date from RTC
52+
display.rtcGetRtcData(); // Get the time and date from RTC
5353
seconds = display.rtcGetSecond(); // Store senconds in a variable
5454
minutes = display.rtcGetMinute(); // Store minutes in a variable
5555
hour = display.rtcGetHour(); // Store hours in a variable

examples/Inkplate5/Advanced_Inkplate_Features/Inkplate_RTC_Interrupt_Alarm_Example/Inkplate_RTC_Interrupt_Alarm_Example.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ void loop()
5555
{
5656
display.clearDisplay(); // Clear frame buffer of display
5757
display.setCursor(100, 100); // Set position of the text
58-
display.rtcReadTime(); // Get the time and date from RTC
58+
display.rtcGetRtcData(); // Get the time and date from RTC
5959

6060
// Print the time on screen
6161
printTime(display.rtcGetHour(), display.rtcGetMinute(), display.rtcGetSecond(), display.rtcGetDay(), display.rtcGetWeekday(), display.rtcGetMonth(), display.rtcGetYear());

examples/Inkplate5/Advanced_Inkplate_Features/Inkplate_RTC_Timer_Example/Inkplate_RTC_Timer_Example.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ void setup()
6969
int n = 0;
7070
void loop()
7171
{
72-
display.rtcReadTime(); // Get the time and date from RTC
72+
display.rtcGetRtcData(); // Get the time and date from RTC
7373
seconds = display.rtcGetSecond(); // Store senconds in a variable
7474
minutes = display.rtcGetMinute(); // Store minutes in a variable
7575
hour = display.rtcGetHour(); // Store hours in a variable

examples/Inkplate6/Advanced_Inkplate_Features/Inkplate_RTC_Alarm_Example/Inkplate_RTC_Alarm_Example.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ void setup()
6363
int n = 0;
6464
void loop()
6565
{
66-
display.rtcReadTime(); // Get the time and date from RTC
66+
display.rtcGetRtcData(); // Get the time and date from RTC
6767
seconds = display.rtcGetSecond(); // Store senconds in a variable
6868
minutes = display.rtcGetMinute(); // Store minutes in a variable
6969
hour = display.rtcGetHour(); // Store hours in a variable

examples/Inkplate6/Advanced_Inkplate_Features/Inkplate_RTC_Basic_Example/Inkplate_RTC_Basic_Example.ino

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@
2828
Inkplate display(INKPLATE_1BIT); // Create an object on Inkplate library and also set library into 1-bit mode (BW)
2929

3030
// Set clock
31-
uint8_t hour = 12;
32-
uint8_t minutes = 50;
33-
uint8_t seconds = 30;
31+
uint8_t hour = 8;
32+
uint8_t minutes = 25;
33+
uint8_t seconds = 0;
3434

3535
// Set date and weekday (NOTE: In weekdays 0 means Sunday, 1 menas Monday, ...)
3636
uint8_t weekday = 4;
37-
uint8_t day = 11;
38-
uint8_t month = 11;
37+
uint8_t day = 16;
38+
uint8_t month = 12;
3939
uint8_t year = 21;
4040

4141
void setup()
@@ -52,8 +52,8 @@ void setup()
5252
// Variable that keeps count on how much screen has been partially updated
5353
int n = 0;
5454
void loop()
55-
{
56-
display.rtcReadTime(); // Get the time and date from RTC
55+
{
56+
display.rtcGetRtcData(); // Get the time and date from RTC
5757
seconds = display.rtcGetSecond(); // Store senconds in a variable
5858
minutes = display.rtcGetMinute(); // Store minutes in a variable
5959
hour = display.rtcGetHour(); // Store hours in a variable

0 commit comments

Comments
 (0)