Creating custom touch keypads for gLCDs
Posted: Fri Mar 28, 2025 10:18 am
For those that are interested in touch gLCDs, who struggle to create their own touch keypad, we have added the ideal solution to the Graphical LCD Display manager.
Not only will it create the widgets as keypad buttons with your custom text, it allows you to click on the widgets so you have a working keypad.
Simulation works great!: An example project has been created, so you can have a working keypad on your gLCD.
This is the function macro that is very flexible in what you can create: Lots of flexibility and there are also tooltips to help. Make sure you download the latest component updates, then reload project before running and sending to hardware.
How the key touch is detected
The first widget is automatically assigned a unique widget ID e.g. the first widget with text 1 on it is assigned 24.
All the following widgets ID is then incremented from 24, e.g. widget with text 6 on is assigned 24+ 5 = 29.
The widget button pressed can then be calculated from 29 – 24 + 1 = 6.
Note: if you get a unable to run simulation error or compile error, then make sure you have the latest components downloaded.
Not only will it create the widgets as keypad buttons with your custom text, it allows you to click on the widgets so you have a working keypad.
Simulation works great!: An example project has been created, so you can have a working keypad on your gLCD.
This is the function macro that is very flexible in what you can create: Lots of flexibility and there are also tooltips to help. Make sure you download the latest component updates, then reload project before running and sending to hardware.
How the key touch is detected
The first widget is automatically assigned a unique widget ID e.g. the first widget with text 1 on it is assigned 24.
All the following widgets ID is then incremented from 24, e.g. widget with text 6 on is assigned 24+ 5 = 29.
The widget button pressed can then be calculated from 29 – 24 + 1 = 6.
Note: if you get a unable to run simulation error or compile error, then make sure you have the latest components downloaded.