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 Online API documentation can be reached at <http://docs.iteadstudio.com/ITEADLIB_Arduino_Nextion/>.
26 
27 Offline API documentation can be found under directory
28 [doc](https://github.com/itead/ITEADLIB_Arduino_Nextion/tree/master/doc).
29 
30 # Suppported Mainboards:
31 
32 **All boards, which has one or more hardware serial, can be supported.**
33 
34 For example:
35 
36  - Iteaduino MEGA2560
37  - Iteaduino UNO
38  - Arduino MEGA2560
39  - Arduino UNO
40 
41 # Serial configuration
42 
43 In configuration file `NexSerialConfig.h`, you can find two macros below:
44 
45  - dbSerial: Debug Serial (baudrate:9600), needed by beginners for debug your nextion applications or sketches. If
46  your complete your work, it will be a wise choice to disable Debug Serial.
47  - nexSerial: Nextion Serial, the bridge of Nextion and your mainboard.
48 
49 **Note:** the default configuration is for MEGA2560.
50 
51 ## Redirect dbSerial and nexSerial
52 
53 If you want to change the default serial to debug or communicate with Nextion ,
54 you need to modify the line in file `NexSerialConfig.h`:
55 
56  #define dbSerial Serial ---> #define dbSerial Serialxxx
57  #define nexSerial Serial2 ---> #define nexSeria Serialxxx
58 
59 ## Disable Debug Serial
60 
61 If you want to disable the debug information,you need to modify the line in file
62 `NexSerialConfig.h`:
63 
64  #define DEBUG_SERIAL_ENABLE ---> //#define DEBUG_SERIAL_ENABLE
65 
66 # UNO
67 
68 If your board has only one hardware serial, such as UNO, you should disable
69 dbSerial and redirect nexSerial to Serial(Refer to section:`Serial configuration`).
70 
71 
72 -------------------------------------------------------------------------------
73 
74 
75  DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
76  Version 2, December 2004
77 
78  Copyright (C) 2014 ITEAD Studio
79 
80  Everyone is permitted to copy and distribute verbatim or modified
81  copies of this license document, and changing it is allowed as long
82  as the name is changed.
83 
84  DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
85 
86  TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
87 
88  0. You just DO WHAT THE FUCK YOU WANT TO.
89 
90 
91 -------------------------------------------------------------------------------