Start a new topic

Image problem Button

Hi, i want to Blink one image inside a "For Loop" when I touch a button. The code runs correct, but I can not stop this event even if I use another button. My code is:

"

while(Stop.val!=1)

{

  for(n0.val=0;n0.val<100;n0.val++)

  {

    vis Image,1

    delay=40

    vis Image,0

    delay=450

    if(Stop.val==1)

    {

      vis Image,0

      com_stop

    }

  }

}

"

Stop is a button with val==1that I set to stop this event, but when I touch the button to start blinking then all of the display button's does not respond. What can I do to Work correctly the programm and To stop the Blinking mode and of course to respond all of the pages button?
Thanks.



wrong logic ...


for such we have timers ...

Please refer to the Nextion Instruction Set
   Section 2.26 and 2.27


Why would you use the vis command in a for inside a while

 - Sequential processing


Login or Signup to post a comment