| Documentation For Arduino users

- Main Page
- Related Pages
- Modules
- Classes
- Files
- Examples

- File List
- File Members

CompRtc.ino
1
18 #include "Nextion.h"
19
20 NexText t0 = NexText(0,1,"t0");
21 NexRtc rtc;
22 uint32_t time[7] = {2016,11,25,12,34,50};
23 uint8_t time_buf[30] = {0};
24
25 void setup()
26 {
27 nexSerial.begin(115200);
28 rtc.write_rtc_time(time);
29 }
30
31 void loop()
32 {
33 rtc.read_rtc_time(time_buf,30);
34 t0.setText(time_buf);
35 delay(1000);
36 }
NexRtc
NexRtc component.
Definition: NexRtc.h:31
NexText::setText
bool setText(const char *buffer)
Set text attribute of component.
Definition: NexText.cpp:32
nexSerial
#define nexSerial
Define nexSerial for communicate with Nextion touch panel.
Definition: NexConfig.h:37
Nextion.h
The header file including all other header files provided by this library.
NexRtc::read_rtc_time
uint32_t read_rtc_time(char *time, uint32_t len)
read rtc time
Definition: NexRtc.cpp:166
NexText
NexText component.
Definition: NexText.h:30