Documentation
For Arduino users
Main Page
Related Pages
Modules
Classes
Files
Examples
File List
File Members
CompSlider_v0_32.ino
1
20
#include "
Nextion.h
"
21
22
NexText
t0 =
NexText
(0, 2,
"t0"
);
23
NexSlider
h0 =
NexSlider
(0, 1,
"h0"
);
24
25
NexTouch
*nex_listen_list[] =
26
{
27
&h0,
28
NULL
29
};
30
31
void
h0PopCallback(
void
*ptr)
32
{
33
uint32_t number = 0;
34
char
temp[10] = {0};
35
36
dbSerialPrintln(
"h0PopCallback"
);
37
38
h0.
getValue
(&number);
39
utoa(number, temp, 10);
40
t0.
setText
(temp);
41
}
42
43
void
setup(
void
)
44
{
45
nexInit
();
46
h0.
attachPop
(h0PopCallback);
47
dbSerialPrintln(
"setup done"
);
48
}
49
50
void
loop(
void
)
51
{
52
nexLoop
(nex_listen_list);
53
}
54
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_v0_32.ino
Generated on Fri Jan 6 2017 14:00:36 for Documentation by
1.8.7