Hi, guys. I need your help, your advice. I'm bad in English, I'm only learning the code. Do not judge severely. Here is my project and the code for registering the temperature in different points. The code does not look good, I apologize. My problem is that the data is transferred to the display with an error. Some information frames are not filled in. Can a delay be necessary?
Some condition that only one value be sent to the display. I created many buffers for each sensor. Tell me if one is enough. I changed the variable float to a string, but there was a compilation error. If there are any extra points in my project, I will be glad if you point to it. Thank you in advance.
I was able to display the readings from 2 sensors. It's simple. If more, problems arise. Tell me in which direction to move, what to look for, what to read.
Nextion is used with thousands of MCUs.
Knowing your MCU and what is connected to it is important and user duty.
Even saying "Arduino" doesn't state too much
- is it referring to the Arduino programming IDE? if so what version
- is it referring to the Arduino C++ flavour of the language, this differs from C++
- is it referring to an MCU board sold by Arduino, there are many. Which?
- which hardware platform? AVR, ARM, Intel?
But many Arduino do not need to be programmed in Arduino C++
What is common is Nextion
- you never stated Basic, Enhanced, Capacitive Multi-touch?
But in the Nextion Forum, are Nextion ideas suppose to be discussed
Arduino has their own forum for discussing Arduino.
Delay? Always a bad idea. Lazy mans means that halts MCU processing at line X till time runs out. Better is to purposefully code when something should be run.
Float to string? How do you add up four values and average them as a string? Float to Integer not better?
Nextion provides sufficient information, listen for it, use it.
- see Nextion Instruction Set - Return Data
Well, it's Arduino mega 2560 and nextion NX8048K070 Enhanced Capacitive multi-touch.Arduino Ide 1.8.3. 4 sensors DS18B20(each to 1 pin Arduino) and 1 DHT22.,4 reed switch.1 sens-1 text box.But sometimes textbox are empty,not all but 2-3.
Specifically, what is the Nextion related question?
The data on the display is transmitted with an error. As I understand too much information. What should I do to fix this? If I use the "show page" function, when I click the button. The "back" button will be on several pages (to the main page). Is it possible to declare it once? The id of the pages is the same ..
You are not following what each is doing and when they are doing what.
MCU will only do exactly as told - revisit what you told each to do.
You need to be much more exacting when you look at what you told
each to do, as an MCU will only ever be very exacting when it follows
the instructions you gave it.
Stop guessing about what it might be doing (too much info = only a guess)
learn what it is really doing by following the code instructions.
Look up what your instructions actually mean
Cut, copy and paste without understanding lead to not knowing.
Instead, use debugging techniques to drop yourself notes hints and times