Hi all,
I've done some searching on this but couldn't find anything that really addressed this issue, so I'm hoping someone here has some advice or can point me in the right direction.
I'm working on a music sequencer project and have decided to use an lcd. I have it breadboarded and have installed and am using the newLiquidcrystal library via a 74hc595 shift register. Everything is up and running well on the hardware side.
My question is related to understanding how to best write the code for controlling the LCD. In my sketch there are alot of times that I want to write a bunch of data to the LCD (like switching to a new menu or something where the entire display will change), but then once the data has been written, it is pretty much static. It doesn't need to be constantly updated (rewritten) each time through the loop. Ideally there would be a way to indicate that something within the loop should only occur once.
I have used flags in a number of places to get certain code blocks to only execute when a variable changes, but all of the flags need to be global, and there are alot of places where it looks like I will have to create flags, basically one flag each for everyhting that I don' want the display to be constantly updating. This seems both very inefficient and like it is contrary to good coding practices. (I am pretty new to coding but am trying to learn how to do things "the right way")
It seems, (from my newbie point of view) that controlling LCD updates would be a fairly common concern amongst programmers, but I haven't been able to find any code, or even any discussion about how to achieve this.
Anybody here have some insight on this or some links you could direct me to?
Thanks in advance.