May 06, 2017

Creating a Menu system on a LCD display

   Hey everyone, how are you doing todaaay ?. This blog post (and video) is all about how to create menu systems (screens) on a LCD (16x2) display, making use of Arduino UNO. 
   Menus are specially useful on small LCD screens when you have a lot of information to show and too little space available. I show in the video below how to implement a six (6) screen menu system that you can navigate by simply pressing a button. 


   The actual schematic diagram (drawn in Fritzing) is shown below, and contain one push-button, one i2c LCD display and one Arduino UNO. As simple as it gets!!.

Click the image to enlarge

   Coding for this project has its own details, but is nothing beyond beginner: every button press increments the variable "WhichScreen" by one (up to six), then a switch..case function is used to determine which screen (tied to a specific function) will be shown at the moment.
   The button pressing is debounced by the use of the 'debounce.ino' sketch, which comes with the current Arduino IDE. Every one of the six functions contains all code necessary to write messages (or other things) to every column and line of the chosen LCD display. 
   Code for this project (same seen in the video) is available on my GitHub and also shown below:


All materials used in this tutorial are available on ICStation (click here) and below:


No comments:

Post a Comment