Hello,
I'm new to this forum, and new to arduino.
I have home central heating project that is controlling 3-way to set correct supply heat to radiators using temperature sensors in heating system and in living room.
To achieve this I decided to use 2 arduinos (Uno - in boiler room and Mega in living room currently) that is communicating using HC-12 RF modules.
Uno has 3 DS18B20s temperature sensors and controls the valve motor using relays.
Mega has BME280 temperature and humidity sensor and Nextion Enhanced 3.5" display (NX4832K035_011R). (Initially started with 2.4 inch TFT LCD screen ILI9341 shield - that is why I needed the Mega - to have spare pins, because the screen takes all pins of the Uno, but Nextion gives better looks and easier design, so decided to switch).
Initially I have used the original Nextion libraries from ITEAD, but had random communication issues so redone it using tutorial made by PerryBebbington - was a very big help, and was able to do all forward and back communications with it easily. Big thanks to him..
So now the problems that I have...
I decided to use the Waveforms to display charts of the temperature change (Set temperature, Actual temperature on one form, and Set supply temp, Actual supply temp, Return temp, Accumulated temp on other page). And the issue is that I could'n find a way to add value to Nextion Waveform while other page is active...
What I want is while I'm looking to the main page (showing actual temperature and humidity), the waveforms would still get the data so I could go those pages and see the history of the change (I should get 80 minutes of history there by writing every 10 seconds in to 450 pixels...)
Function "add ID,Channel,Value" does not have possibility to define page anywhere (or I missed something?). So in this case I should use the "addt" function and load all the data at start of the page, but then question is where should I store the data for 6 channels (450 pixels wide so 6x450 of uint8_t ?).
Fastest load would be if I would be able to store it in the Nextion display itself - It has lots of memory, but how should it be done? There is a variable element that can store number or string, so I do not think that i could use that? So maybe there is a way so save the data in the SD card? Display has this slot for loading the Layout project, so maybe it could be used to save and read data from it? Have any one tried to do so?
If data could not be stored in the Display itself (or It's SD card) so then I should use another SD Card module connected to Mega? (If so, then I'll need to look for those tutorials ) Or maybe this amount of data would be perfectly OK to be stored inside of the memory of Mega? I do not think that I really need to permanently store the data, so that it could be retrieved after power loss.. But having it would be a bonus (would be able to have longer history with buttons that loads older data...).
Will not post any code, because I have no problems currently with mine (thanks again to PerryBebbington for that... )