In this easy Arduino Tutorial we are going to learn how to create a Menu on a Nokia 5110 LCD display. We are using an Arduino Uno today but you can use any Arduino you like. Let’s get started with the Arduino Nokia 5110 Menu tutorial!
Arduino Nokia 5110 Menu – The Parts
Hello guys, I am Nick and welcome to educ8s.tv a channel that is all about DIY electronics projects with Arduino, Raspberry Pi, ESP8266 and other popular boards. In this video we are going learn how to build our own menus for the popular Nokia 5110 LCD display, in order to make our projects more user friendly and more capable. Stefan, a friend from Germany, asked for this project so here it is!
This is the project we are going to build. In the display a simple menu appears, and with the help of three buttons I can navigate up, or down and select a menu item. Let’s select the first option. As you can see a new a UI screen is displayed and by pressing the up and down buttons we can change the contrast of the display. If we press the middle button again, we go back to the main UI screen. If we now select the second menu item and press the middle button we can turn the backlight of the display on or off. Lastly if we navigate to the last menu item we can reset the settings for the display to the default values. Of course this is just a demonstration project, you can modify it to build your own more complex menus if you wish. Let’s now see how to build this project.
The parts needed in order to build this project are the following:
WHERE TO BUY
Arduino Uno: http://bit.ly/Cheap_Uno
Nokia 5110 LCD: http://bit.ly/NOKIA5110
Small Breadboard: http://bit.ly/SmallBreadboard
Jumper Wires: http://bit.ly/JumperWiresB
3 in 1 wires: http://bit.ly/Wires3InOne
Full disclosure: All of the links above are affiliate links. I get a small percentage of each sale they generate. Thank you for your support!
📥 Adafruit GFX: https://github.com/adafruit/Adafruit-GFX-Library
The code of the Arduino Nokia 5110 Menu tutorial is complex but I will do my best to explain it. You will get a basic understanding of how the code works but if you want to fully understand it you have to make your own menu and see exactly how it works. Let’s start.
In this project we use two libraries for the display from Adafruit. You can find links for both in the description of the video. At first we are going to take a look at the drawMenu function. This function is responsible for drawing the Menu on the display. This function is called every few miliseconds, so if there is a change on the menu this function is responsible for updating the menu on the screen. There are also two very important global variables, the variable page and the variable menuitem. The variable page remembers which UI screen is displayed on the screen. So, if the page variable is 1, we are in the main UI screen, and if the variable is 2 we are in the Contrast UI screen. The menu item remembers the selected menu item. So, if its value is 1, the first menu item is selected, so the drawMenu function must draw this menu item as black with white letters. If the menu item is 2 the second menu item is selected and so on.
CODE OF THE PROJECT
SUBSCRIBE ON YOUTUBE
Never miss a video: Subscribe to educ8s.tv