Start a new topic

page select

Hi i would ask is it possible for making the data received to change it page. For example ;

1. I press keypad that I already make on nextion -> 5,6,7 and it will write on t0 box.

2. Then I press Enter button it will get t0.txt data. ( 0x70 0x34 0x35 0x36 0xff 0xff 0xff )

3. Could i make it only react with the data I received and make it change to other page.

4. If the data is different it  will not react and not change to other page.

I abit confused to step 3 and 4. My project that i want to do is when I enter password the led will turn on and it will change to page brightness to control it brightness. I already successfully with controling brightness just still figure it out how to make the 4,5,6 password only make it change to page brightness and if valid password it will not change page.

@Looky_Xu Yes,its my colleague,we accidently post up the same coding at same forum. Btw thanks and I'll try look through it using slider. I will update from time to time for my project.

Hi,Fauzan. is this your post:

Use the same code.

Your idea is interesting.maybe you can have a try "slider" component to control brightness or motor speed or volume.

Here's the result of my project. I dont know whether you understand or not my coding cause I also new in arduino but its work perfectly only the brightness still not so smooth when the led is turn on. Like when the led on the dimness of the led already 30 then when i adjust it there's some looping when maximise it but after minimise back the brightness and max again it light up smoothly. If you guys have any idea how to shorten my coding please do tell me I'm still learning.

123>Enter>LED Turn Off

456>Enter>LED Turn On & Automatically go page brightness

(4.54 KB)
(6.41 KB)

1 person likes this

can you post your next revision so we can see further examples of the changes?

@Raphael Thanks for helping me out. I forget about the newest update 'if'. It works smoothly. Gonna try it out for my project soon. :)

Maybe it's possible to use a conditional statement directly in the display, without using the arduino code.

You can try something like this (I have not tested it) in the Touch Release Event of the Enter key:

page brightness


1 person likes this

correction -> if valid = if not valid*.



Here are my example hmi file. I want to remove the brightness button so that only valid password can go to brightness page. When I press 123 the led turn off but I still can adjust the brightness if I push the brightness button.

here are the summary of all : 

123 > Enter > LED OFF 

456 > Enter > LED ON + go to page brightness

(219 KB)

and here the arduino file that im using. This one is the basic one only to turn off and on using password

(356 Bytes)
Login or Signup to post a comment