IoT of Nextion X TFT ILI9341: Experimental Results and Comparative Survey

This study presents the results obtained in experimental and comparative research, between the Nextion and TFT devices ILI9341, carried out in 2017, focusing mainly on the positive and negative points presented by the different devices when using a touch screen display for Arduino. The methodology used to obtain the data was experimental research with the devices, applying for the systematic review, considering personal experience when using these types of equipment. After obtaining the data was proceeded to consolidate, categorize and analyze the quantitative and qualitative results. There was a perception about the results that point out the pros and cons on the different technologies, among these areas: the ease of creating interfaces to the screen; the ease of configuration and installation, as well as the quality of the products and their prices. In counterpoint, the Nextion device presented a higher cost compared to the TFT devices ILI9341, the main difference between the two devices is in: their prices; ease of solutions creation. In addition to the use of Arduino board resources, in these requirements, the devices Nextion presented better results, as presented in this study.


Introduction
The main motivation for the development of this work was the origin of personal and group experiences, in which the main advance and use of resources for industrial automation was observed. Especially, since this is a trend that is being applied in different areas such as robotics, residential and industrial automation, as shown in studies presented by the IEEE Computing Society and the IEEE Internet of Things Journal. As general objectives, the use of the Nextion and ILI9341 devices should be analyzed, with the specific objectives being the tests with the interface creation tools and the device connections. The results should be of the quantitative and qualitative type, as a comparison between the consolidated values should be necessary, as well as a detailed analysis of the use of

Results and Analysis
The Internet of things as presented by the IEEE Electrical and Electronics Engineers (IEEE) discussed by Minerva [20] defines the internet of things like "... A system of self-configuration and adaptation, consisting of a network of sensors and intelligent objects, in the what the purpose is to interconnect all things ... "(author's translation), among other explanations presented by the authors Li and Kara [16]; in this context the work presented by the IEEE developed by: Liu et al. [17], Niyato et al [23], Larrucea et al. [15], Verikoukis et al. [27], Hgai et al. [10], Yang et al. [30], Wolf and Dimitrios [29], Mukhopadhyay and Wolf [21], Ebling and Want [5], Mung et al. [22], in addition to the statements of the European Research Projects on the Internet of Things (CERP IoT) [4].
The Telecommunication Standardization Sector (ITU-T) [4], the main source of studies on IoT, defines the IoT as follows: "The Internet of Things (IoT) has been defined in ITU-T Recommendation Y.2060 (06/2012) as a global infrastructure for the information society, enabling advanced services interconnecting things (physical and virtual) based on existing interoperable information and constantly evolving and communication technologies. " Translated by the author.
Tibúrcio et al. [26] explain that the Internet of Things was first proposed by Kevin Ashton in 1999 as a concept of connected objects that can be operated simultaneously and are uniquely identifiable. Since then, the definition of IoT has evolved, and although it has several variations, it is generally defined as a global and dynamic network infrastructure with self-configurable capabilities based on standard and interoperable communication protocols; virtual and real things in IoT have identities and attributes, are able to use intelligent interfaces and are integrated as different information networks. In traditional architectures, systems are known as silos, where each application is built with the support of Proprietary Information and Communication Technology (ICT) infrastructure and dedicated devices. Dilli et al. [5] emphasize that the internet of things is gaining prominence about the evolution of the internet because the internet of things makes possible the connection of all things, such things must have sensors and devices that allow this connection to the internet.
Challenges have also increased with the advent of the internet of things, mainly due to the need to increase the capacity of the internet network to connect the various devices, allowing access in different locations, as well as the transfer of data regardless of location, The manufacturer of Arduino [3], presents the following product information: Arduino is an open source electronics platform based on easy-to-use hardware and software. Arduino boards are capable of reading inputs -lights on sensors, touching the screen and pressing a button, or allowing you to send and receive a message via Twitter -and turn it into an output -by activating a motor remotely, LED), publishing data online, sending a set of instructions to the microcontroller of another Arduino. To do this, Arduino uses its programming language with Arduino software (IDE), based on the processing.
Veloso et al. [28], explains that the NodeMCU is from the ESP8266 family (a device for connecting to the Internet by WiFi), being one of the easiest to use, and it is not necessary to use another device like Arduino, because the same already has the necessary processing capacity to run your applications, still has the direct connection to WiFi, without the need to install new devices or extra libraries, unlike the Arduino Uno, which does not have this capability and requires other connections and libraries specified.  [19].
The Arduino Uno was selected for this project, due to its compatibility with the devices that should be part of this study, due to the fact that the device NodeMCU 12e presented by Veloso et al. [28], which is a superior competitor to Arduino Uno, but it does not have all the ports required for use with the ILI9341 model. Figure 2: Device Nextion NX3224T024. Presented by Itead [12].
The Nextion device presented by Itead [12], is a recent product in the national and international market, because it has very specific characteristics, its development and production plan tried to solve problems of other types of displays, in this case, some of these points should be presented and discussed throughout this work. The ILF9341 TFT device presented by Adafruit [1] is one of the most inexpensive and easy-to-locate devices to purchase, both nationally and internationally, easily accessible nationally and at very affordable prices, this device is the most common for use with projects for Arduino, or for the internet of things. For this study, the Arduino Uno device should only be used as a development and operation platform to demonstrate the main features of Nextion and LIL9341, without the use of the Internet, or any more sophisticated features.
The experiments were applied to the two types of devices using the bibliographic references of Arduino [3], Nextion [12] and the manufacturer of TFTILI9341 ILI9341 [11], and the libraries and documents available on GitHub [7] of libraries to work with different devices for the internet of things. In addition to the manual tests performed directly on the devices, considering a score between 1 and 0 (these are used as points for consolidation) for each question, considering the value 1 as relevant, that is, it has the evaluated resource, and 0 for irrelevant, considering situations in which the resource does not exist, comparing important points of use such as speed, capacity, and processing, in this way the following items were selected and evaluated: a) Price: The value of the devices varies according to the places searched, very low prices were found, for example, for Nextion prices were found between R $ 120,00 and R $ 220,00, for ILI9341, values between R $ 40.00 and R $ 80.00 were found, these being considered as the lowest prices, the two types of equipment were demonstrated with little equivalent values. b) Uses MicroSD: The use of MicroSD becomes important when updating programs and updating devices, besides having the ability to execute programs external to the device, from this point the two devices can work with a card. MicroSD Flash memory. c) Software for Design: During the studies the use of a software facilitates the creation and maintenance of the layout that should be used in the device, in this case, the Nextion presented better results, because the software is easy to work, the ILI9341 is necessary to use of lines of code, making development difficult, in addition to overloading the file size of code in Arduino, in tests with a very elaborate screen, contented several lines of code the Arduino was not able to load. d) Resolution: The two devices have the same image resolution quality, having the same characteristics, being these 320X240, or, 240X320, in the vertical or horizontal positions. e) Size 2.4 ': In this requirement the two types of equipment have the same measurements for the size of the display, not presenting differences between them. f) A smaller number of pins: During the configuration Nextion presented the use of a smaller number of pins, in which only four are used, with the ILI9341 device ten pins are used, making it difficult to use other devices depending on the design. g) Less use of libraries: ILI9341 uses 3 libraries, these being: Adafruit_GFX.h, Adafruit_ILI9341.h, Adafruit_STMPE610.h, available in GetHub-9341Lib [9]. While Nextion uses only one, available in GetHub-Ited Lib [8]. h) Fewer lines of code: In this requirement due to the platform available by Itead [12], there was a large reduction of code line when using the Nextion device, in contrast, the ILI9341 device required a larger number of codes to present the results on the screen.  [12], facilitates the construction, unlike ILI9341 where three libraries are required, Nextion needs only a library. j) Best resolution: In this case, the total resolution is also displayed on devices with the same characteristics, that is, 64k resolution quality. k) Smaller size: Based on the information provided by the manufacturers, the Nextion was smaller compared to its competitor, which measures: 74.4x42.9x4.6mm, while the LIL9341 has the dimensions: 71x52x7mm. l) The highest number of colors: Also in this requirement, the two devices share the same characteristics, using 16,000 colors. m) UART Serial: In this case the Nextion device has the UART feature, allowing the use of only two connection cables, while the ILI9341 does not have this feature, using almost all the outputs of the Arduino Uno. n) Uses 16 bits: The two devices have similar features, working in the same way with 16-bit processing quality. Table 1 Comparative table results with the devices Nodemcu 12e and Arduino Uno. By the author.
Analyzing the results presented on the consolidation of the desired requirements to develop an automation project with the touch Nextion or ILI9341 displays, in which there is no need to send or access information from a WiFi network, we have: a total of 14 items, 13 (92.85%) being considered relevant for the NodeMCU 12e device, 7 items being relevant to ILI9341, 50% relevant points that this device meets a design for automation.
The difference between the two devices shows 53.84% of the variation, considering a probability of 5%, the result represents a great relevance, in this way that the use of the NodeMCU 12e, demonstrated that this equipment is superior in different aspects in comparison with the ILI9341. Tests with the devices were performed using the following sample code available in IteadLibNextion [13], called CompButton_v0_32.ino: / ** * @example CompButton.ino * * @par How to Use * This example shows that when the button component on the Nextion screen is released,

Characteristics NEXTION TFT ILI9341
Best price 0 1  During the execution of the CompButton_v0_32.ino code in Arduino Uno, it is possible to change the value displayed in the button, during pressing the button through the interface its value will increase, reflecting the command that is being executed internally in Arduino Uno. For ILI9341, the example available in GetHubAdafruitILI9341 [1] was tested, the example file used was onoff button.ino, due to its size and complexity, it was possible to notice the increase of code lines, having 122 lines, compared to presented by Nextion, which uses 83 lines (even considering the lines of comments). When loading the code to ILI9341, you can check the loading of the three libraries required to run the device with the sample program, these being: #include <Adafruit_GFX.h> #include <Adafruit_ILI9341.h> #include <Adafruit_STMPE610.h> ...
Compared with the Nextion sample, only the "Nextion.h" library was loaded, thus demonstrating ease of loading and memory usage between the two devices. Figure 5: Connection schema with the devices Arduino Uno and Nextion. Presented by Itead [12] The wiring diagram follows the guidelines given on the manufacturer's website in Itead [12]. Authors Abdullah and Putra [2] present in greater detail the use of IDE presented by Itead [12], together with Nextion, demonstrating a practical application of the devices and their tools. In the connection scheme of the ILI9341 display, it is only necessary to couple the device to the Arduino Uno, in this way it is possible to observe the use of all the Arduino output ports.

Conclusion
With the consolidation of the data and analysis of the results obtained during this research, which allowed to conclude when observing the positives and negatives of the devices Nextion and ILI9341, it is observed that although the differences in the costs between the devices are a point of prominence, in comparison to the objectives of each type of project, it is possible to identify the main benefits of the Nextion device, it presented several advantages over the configurations and used, despite their high price.
Considering in this way the fulfillment of the objectives of this project, in which it was possible to identify the main characteristics of each device, comparing them, testing and validating each one of the necessary requirements for the development of a simple project, which can meet the needs basic presentation and interaction with devices and humans, with a difference of 53.84% in relation to the points that stand out the requirements addressed for analysis, between the two devices, considering as positive points 92.85% for the Nextion , compared to 50% for ILI9341.
Another important point observed is the ease of operation of the Itead Editor system, which allows the creation of graphic layouts with great quality, being also easy to operate with Nextion, this also required the loading of only one library, compared to ILI9341 , which presented the need to load at least three libraries, the lines of code being very extensive and detailed, this due to the need to create the screen objects directly by code lines, not by the use of a visual interface.
Other tests performed with extensive programming codes have made it possible to identify problems with Arduino Uno memory, which has memory limitations compared to other devices, such as NodeMCU, in which case NodeMCU was able to execute extensive codes without problems, this allowed the use of a larger number of screens and resources to manage the data by different devices.