NexText txtTemp = NexText(0, 2, "txt_temp") //texto com o valor da temperatura NexButton btnNext = NexButton(0, 3, "btn_next") //botão da página 0 NexProgressBar progHumid = NexProgressBar(0, 16, "prog_humid") //Progress Bar umidade * DECLARAÇÕES DOS OBJETOS DO NEXTION: */ NexProgressBar progTemp = NexProgressBar(0, 1, "prog_temp") //Progress Bar temperatura We also have the array in which we declare Nextion objects that will have touch event interaction. variáveis de controle de tempo, para funcionar como um cronômetro Uint8_t pinLED = 3 //pino que ligamos o LED no arduinoīool is = true //variável de controle para saber se é a página ZERO que está em telaīool isLedOn = false //variável de controle para saber se o LED está acesoĬhar buffer = //buffer para armazenar dados string variáveis que armazenam os dados do DHT22 Static int pinDHT22 = 7 //pino que ligamos o DATA do DHT22 no arduino #include "Nextion.h" //biblioteca para comunicação com o display NEXTION #include //biblioteca para comunicação com o DHT22 We also define the variables that store the data of DHT22 and for control of the Led, among others. We will include the libraries for communication with the Nextion display and for communication with the DHT22. In addition, we’ll create an example using a microcontroller running with Nextion. In this video today, we will learn about the IDE Nextion Editor, create a simple example without a microcontroller, and simulate in the Nextion simulator. Important information regarding this is that Display Nextion uses STM32. The microcontroller, an Arduino Uno in this case, just keeps sending the code. Therefore, in this "smart display,” all graphic processing is done by Nextion itself. This differs from traditional displays, in which I have to execute the desired drawings, pixel by pixel. For an example: When I want the lamp to appear on the screen (same as the image shown below), I will not need to draw this entire lamp, as I will simply record the drawing on the display and print its ID. How does this differentiate from the others? In addition to the graphics controller, it has a microcontroller connected in the Uart TX RX. Have you ever learned about "smart display?” Well today, I present the Display Nextion.