Hi, I am trying to get data from other page (example page1) while I am still page0. As an example I have some values like n0, n1 etc on page1. I am sending n0.val with arduino and I can see the values at page1. n0.val is also global but I want to get n0.val’s while I am on still page0. But n0.val does not refresh itself. I must click page2 then n0.val refreshes, it does not refreshes while I am on page0. Please could you tell me a way to do this. … thanks.
I don’t know if it’s possible to do what you are asking but I also don’t see why you would want to.
You need the Arduino to keep track of which page the Nextion is displaying and only send updates to the current page. No point sending them to a page that’s not displayed; no one can see it. When the page changes send the correct information.
No point in asking for information from a page that’s not displayed because no user can change information on a page that they can’t see.
I suggest you read my tutorial and follow the examples given:
Using Nextion displays with Arduino
I’ve yet to have someone ask me how to do something that can’t be achieved by my methods.
It would help if you explained what you are really trying to do: why you think you need to access data on a page that’s not visible.
hi Perry; “No point in asking for information from a page that’s not displayed because no user can change information on a page that they can’t see.” yes you r right, but page1 does not contain user replaceable values. its values are sending by arduino. so they are always change although you are not in page1… as an example I read a sensor value and send it page 1 n0.val. And I have an alarm system which define in page0. So I must compare alarm value with page1 n0.val. but while I am on page0, nextion do not know last value of n0. ı must go to page1 then return to page0 again, then it refresh n0.val. but I want to do this without going to page1. I want to get n0.val while I am in page0. of course I can define n0.val on page0, this can solve my problem but I am asking to learn if there is a way for this… thanks for your help…
If the Arduino is sending the data then the Arduino knows what that data is, there is no need to read it back.
You need to re-think how you are doing this, the Arduino is in control, the Arduino should hold all the data and know what it relates to, you should not be storing bits of data on the display. Where does your computer store the data displayed on your monitor? Where does it store this text that you are reading now?
Please read my tutorial and understand the examples.
This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.