Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
November 24, 2024, 12:30:16 00:30


Login with username, password and session length


Pages: [1]
Print
Author Topic: Menu system for graphic LCDs 128x64 pixels in CCS C  (Read 3829 times)
0 Members and 1 Guest are viewing this topic.
cycler
Newbie
*
Offline Offline

Posts: 17

Thank You
-Given: 53
-Receive: 40


« on: February 20, 2020, 07:58:15 19:58 »

Hello again.

This time I will give you one of my menu systems. I have made graphical menus in the past with a more project oriented approach, but I ended up spending time redoing the same functionality. This one I made it to be more reusable, I used it in two projects so far, it seems good. It is difficult to achieve a "one size fits all" solution. This one sacrifices space for ease of use and readability. There are lost bytes in the struct of the strings. Since I use rather large PICS now, is no big deal for me but it may not be the case for you. If you check it I would like some feedback, please. If you can suggest ways to improve it, I'll be happy to know them.

It is a rather simple and easy to configure way to create complex menu trees. It is written in CCS C and is based on the GLCD library I posted here a few days ago. This library supports Greek characters, so a bilingual menu can be made very easily. I am attaching here all the necessary files inside the.zip. An example 'main.c' is also included to help. Instruction on how to use it are in the comments inside.

It creates a root menu with up to 5 entries (all screens can fit up to five items) that can lead to other sub-menus. The menu items can have some code attached, to do something, or they can have a parameter to change. The menu is used with four buttons as I almost always have at least four buttons on my projects. It needs Up and Down to choose (and also increase and decrease), as the menu is vertically arranged, a Back button to exit without an action made and an Enter to select, save or execute.

It looks like image 1. When there is a parameter to change, it pops up a box like image 2. We can increase or decrease (image 3) and with Enter it saves and refreshes the screen (image 4).

I uploaded on youtube a small video to show it better:
https://youtu.be/wASAaGrfDKc

Another video showing some functionality with greek characters is here:
https://www.youtube.com/watch?v=1kgoNbN_UIU

I hope someone will find it useful.

Have fun,
Theodore.
« Last Edit: February 29, 2020, 04:05:36 16:05 by cycler » Logged
Pages: [1]
Print
Jump to:  


DISCLAIMER
WE DONT HOST ANY ILLEGAL FILES ON THE SERVER
USE CONTACT US TO REPORT ILLEGAL FILES
ADMINISTRATORS CANNOT BE HELD RESPONSIBLE FOR USERS POSTS AND LINKS

... Copyright © 2003-2999 Sonsivri.to ...
Powered by SMF 1.1.18 | SMF © 2006-2009, Simple Machines LLC | HarzeM Dilber MC