This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Possible to have states?

I'm trying to implement states for a dynamic menu that's being drawn on my LCD. From my understanding, in the main block, we need an infinite loop to run commands. I am trying to call a drawMenuBars() function, which also contains another while(!nextScreen) loop that will not break until nextScreen goes high.

For some reason my LCD screen goes all funky as if a whole bunch of hex codes are being sent. I can only assume this is because there are 2 while loops. I want to stay in the drawMenuBars function until next is pressed, but it seems like I can't have more than one infinite loop. Can someone tell me how to get around this issue so I can implement states pending where a user is?

0