API
For Arduino developers
readme.md
1 @mainpage
2 
3 # Nextion Library for Arduino
4 
5 Nextion Arduino library provides an easy-to-use way to manipulate Nextion serial displays.
6 Users can use the libarry freely, either in commerical projects or open-source prjects, without any additional condiitons.
7 
8 For more information about the Nextion display project, please visit [the wiki。](http://wiki.iteadstudio.com/Nextion_HMI_Solution)
9 The wiki provdies all the necessary technical documnets, quick start guide, tutorials, demos, as well as some useful resources.
10 
11 To get your Nextion display, please visit [iMall.](http://imall.itead.cc/display/nextion.html)
12 
13 To discuss the project? Request new features? Report a BUG? please visit the [Forums](http://support.iteadstudio.com/discussions/1000058038)
14 
15 ​
16 # Source
17 
18 Latest source code can be download at https://github.com/itead/ITEADLIB_Arduino_Nextion.
19 
20 You can clone it by:
21 
22  git clone https://github.com/itead/ITEADLIB_Arduino_Nextion
23 
24 # Documentation
25 
26 Online API documentation can be reached at <http://docs.iteadstudio.com/ITEADLIB_Arduino_Nextion/index.html>.
27 
28 Offline API documentation can be open by clicking `doc/API/index.html`.
29 
30 
31 # Suppported Mainboards:
32 
33 **All boards, which has one or more hardware serial, can be supported.**
34 
35 For example:
36 
37  - Iteaduino MEGA2560
38  - Iteaduino UNO
39  - Arduino MEGA2560
40  - Arduino UNO
41 
42 # Serial configuration
43 
44 In configuration file `NexSerialConfig.h`, you can find two macros below:
45 
46  - dbSerial: Debug Serial (baudrate:9600), needed by beginners for debug your nextion applications or sketches. If
47  your complete your work, it will be a wise choice to disable Debug Serial.
48  - nexSerial: Nextion Serial, the bridge of Nextion and your mainboard.
49 
50 **Note:** the default configuration is for MEGA2560.
51 
52 ## Redirect dbSerial and nexSerial
53 
54 If you want to change the default serial to debug or communicate with Nextion ,
55 you need to modify the line in file `NexSerialConfig.h`:
56 
57  #define dbSerial Serial ---> #define dbSerial Serialxxx
58  #define nexSerial Serial2 ---> #define nexSeria Serialxxx
59 
60 ## Disable Debug Serial
61 
62 If you want to disable the debug information,you need to modify the line in file
63 `NexSerialConfig.h`:
64 
65  #define DEBUG_SERIAL_ENABLE ---> //#define DEBUG_SERIAL_ENABLE
66 
67 # UNO
68 
69 If your board has only one hardware serial, such as UNO, you should disable
70 dbSerial and redirect nexSerial to Serial(Refer to section:`Serial configuration`).
71 
72 # Useful Links
73 
74 <http://blog.iteadstudio.com/nextion-tutorial-based-on-nextion-arduino-library/>
75 
76 -------------------------------------------------------------------------------
77 
78 
79  DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
80  Version 2, December 2004
81 
82  Copyright (C) 2014 ITEAD Studio
83 
84  Everyone is permitted to copy and distribute verbatim or modified
85  copies of this license document, and changing it is allowed as long
86  as the name is changed.
87 
88  DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
89 
90  TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
91 
92  0. You just DO WHAT THE FUCK YOU WANT TO.
93 
94 
95 -------------------------------------------------------------------------------