Nextion User Manual
For Arduino developers
Main Page
Related Pages
Modules
Classes
Files
Examples
File List
File Members
CompSlider.ino
1
17
#include "
Nextion.h
"
18
19
20
NexText
t0 =
NexText
(0, 2,
"t0"
);
21
NexSlider
h0 =
NexSlider
(0, 1,
"h0"
);
22
23
NexTouch
*nex_listen_list[] =
24
{
25
&h0,
26
NULL
27
};
28
29
void
h0PopCallback(
void
*ptr)
30
{
31
uint32_t number = 0;
32
char
temp[10] = {0};
33
34
dbSerialPrintln(
"h0PopCallback"
);
35
36
h0.
getValue
(&number);
37
utoa(number, temp, 10);
38
t0.
setText
(temp);
39
}
40
41
42
void
setup(
void
)
43
{
44
nexInit
();
45
h0.
attachPop
(h0PopCallback);
46
dbSerialPrintln(
"setup done"
);
47
}
48
49
void
loop(
void
)
50
{
51
nexLoop
(nex_listen_list);
52
}
53
nexLoop
void nexLoop(NexTouch *nex_listen_list[])
Listen touch event and calling callbacks attached before.
Definition:
NexHardware.cpp:235
NexSlider
NexSlider component.
Definition:
NexSlider.h:30
NexText::setText
bool setText(const char *buffer)
Set text attribute of component.
Definition:
NexText.cpp:32
NexSlider::getValue
bool getValue(uint32_t *number)
Get the value of slider.
Definition:
NexSlider.cpp:22
NexTouch::attachPop
void attachPop(NexTouchEventCb pop, void *ptr=NULL)
Attach an callback function of pop touch event.
Definition:
NexTouch.cpp:39
nexInit
bool nexInit(void)
Init Nextion.
Definition:
NexHardware.cpp:220
Nextion.h
The header file including all other header files provided by this library.
NexTouch
Father class of the components with touch events.
Definition:
NexTouch.h:53
NexText
NexText component.
Definition:
NexText.h:30
examples
CompSlider
CompSlider.ino
Generated on Mon Aug 17 2015 21:04:48 for Nextion User Manual by
1.8.7