Nextion example dont work
i'm trying upload example nextion folder arduino.
but comes error.
this arduino example code:
but comes error.
code: [select]
arduino: 1.6.8 (windows 7), board: "arduino nano, atmega328"
comppage:19: error: 'nexpage' not name type
nexpage page0 = nexpage(0, 0, "page0");
^
comppage:20: error: 'nexpage' not name type
nexpage page1 = nexpage(1, 0, "page1");
^
comppage:21: error: 'nexpage' not name type
nexpage page2 = nexpage(2, 0, "page2");
^
comppage:22: error: 'nexpage' not name type
nexpage page3 = nexpage(3, 0, "page3");
^
comppage:24: error: 'nextouch' not name type
nextouch *nex_listen_list[] =
^
c:\users\uno\desktop\iteadlib_arduino_nextion-master\examples\comppage\comppage.ino: in function 'void page0popcallback(void*)':
comppage:35: error: 'dbserialprintln' not declared in scope
dbserialprintln("page0popcallback");
^
comppage:36: error: 'page1' not declared in scope
page1.show();
^
c:\users\uno\desktop\iteadlib_arduino_nextion-master\examples\comppage\comppage.ino: in function 'void page1popcallback(void*)':
comppage:41: error: 'dbserialprintln' not declared in scope
dbserialprintln("page1popcallback");
^
comppage:42: error: 'page2' not declared in scope
page2.show();
^
c:\users\uno\desktop\iteadlib_arduino_nextion-master\examples\comppage\comppage.ino: in function 'void page2popcallback(void*)':
comppage:47: error: 'dbserialprintln' not declared in scope
dbserialprintln("page2popcallback");
^
comppage:48: error: 'page3' not declared in scope
page3.show();
^
c:\users\uno\desktop\iteadlib_arduino_nextion-master\examples\comppage\comppage.ino: in function 'void page3popcallback(void*)':
comppage:53: error: 'dbserialprintln' not declared in scope
dbserialprintln("page3popcallback");
^
comppage:54: error: 'page0' not declared in scope
page0.show();
^
c:\users\uno\desktop\iteadlib_arduino_nextion-master\examples\comppage\comppage.ino: in function 'void setup()':
comppage:59: error: 'nexinit' not declared in scope
nexinit();
^
comppage:60: error: 'dbserialprintln' not declared in scope
dbserialprintln("setup begin");
^
comppage:62: error: 'page0' not declared in scope
page0.attachpop(page0popcallback);
^
comppage:63: error: 'page1' not declared in scope
page1.attachpop(page1popcallback);
^
comppage:64: error: 'page2' not declared in scope
page2.attachpop(page2popcallback);
^
comppage:65: error: 'page3' not declared in scope
page3.attachpop(page3popcallback);
^
c:\users\uno\desktop\iteadlib_arduino_nextion-master\examples\comppage\comppage.ino: in function 'void loop()':
comppage:72: error: 'nex_listen_list' not declared in scope
nexloop(nex_listen_list);
^
comppage:72: error: 'nexloop' not declared in scope
nexloop(nex_listen_list);
^
multiple libraries found "nextion.h"
used: c:\users\uno\documents\arduino\libraries\neonextion
not used: c:\users\uno\documents\arduino\libraries\nextion-master
not used: c:\users\uno\documents\arduino\libraries\iteadlib_arduino_nextion-master
not used: c:\program files (x86)\arduino\libraries\iteadlib_arduino_nextion-0.7.0
exit status 1
'nexpage' not name type
invalid library found in c:\program files (x86)\arduino\libraries\nextion-master: c:\program files (x86)\arduino\libraries\nextion-master
this report have more information with
"show verbose output during compilation"
option enabled in file -> preferences.
this arduino example code:
code: [select]
#include "nextion.h"
nexpage page0 = nexpage(0, 0, "page0");
nexpage page1 = nexpage(1, 0, "page1");
nexpage page2 = nexpage(2, 0, "page2");
nexpage page3 = nexpage(3, 0, "page3");
nextouch *nex_listen_list[] =
{
&page0,
&page1,
&page2,
&page3,
null
};
void page0popcallback(void *ptr)
{
dbserialprintln("page0popcallback");
page1.show();
}
void page1popcallback(void *ptr)
{
dbserialprintln("page1popcallback");
page2.show();
}
void page2popcallback(void *ptr)
{
dbserialprintln("page2popcallback");
page3.show();
}
void page3popcallback(void *ptr)
{
dbserialprintln("page3popcallback");
page0.show();
}
void setup(void)
{
nexinit();
dbserialprintln("setup begin");
page0.attachpop(page0popcallback);
page1.attachpop(page1popcallback);
page2.attachpop(page2popcallback);
page3.attachpop(page3popcallback);
dbserialprintln("setup end");
}
void loop(void)
{
nexloop(nex_listen_list);
}
can link library can test please.
Arduino Forum > Using Arduino > Programming Questions > Nextion example dont work
arduino
Comments
Post a Comment