Creating custom touch keypads for gLCDs

Use this section to discuss your embedded Flowcode projects.
Post Reply
medelec35
Matrix Staff
Posts: 1913
http://meble-kuchenne.info.pl
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 619 times
Been thanked: 644 times

Flowcode v10 Creating custom touch keypads for gLCDs

Post by medelec35 »

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!:
Updated  Display Manager1.png
Updated Display Manager1.png (36.63 KiB) Viewed 4016 times
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:
Updated  Display Manager2.png
Updated Display Manager2.png (104.98 KiB) Viewed 4016 times
Lots of flexibility and there are also tooltips to help.
Updated  Display Manager3.png
Updated Display Manager3.png (28.71 KiB) Viewed 4016 times
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.
Attachments
DisplayManager WidgetArray Keypad Example.fcfx
(27.44 KiB) Downloaded 25 times
Martin

chipfryer27
Valued Contributor
Posts: 1528
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 353 times
Been thanked: 549 times

Re: Creating custom touch keypads for gLCDs

Post by chipfryer27 »

Hi Martin

That looks as though it will be very handy indeed.

Regards

medelec35
Matrix Staff
Posts: 1913
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 619 times
Been thanked: 644 times

Re: Creating custom touch keypads for gLCDs

Post by medelec35 »

Thanks,
It was something we at Matrix wanted to create as its so handy for menus or RTC time/date setting.
You can have as many or as little keys as you like, and can be any size with any label.
It is versatile.
I'm going to be using it for my power monitor project so I can manually set the RTC if no internet is available, to reset energy used and to set price for KWh.
No more trying to set up and object and calculating if its been pressed or not.

I have just edited my first post to explain how the touch is detected.
Martin

daddytims_tims
Posts: 74
Joined: Thu Jun 16, 2022 6:16 pm
Has thanked: 110 times
Been thanked: 13 times

Re: Creating custom touch keypads for gLCDs

Post by daddytims_tims »

Hi Martin

You added this example at the right time.
I thought about it.

I will test it out , when I get the time.

Regards

jgu1
Posts: 774
Joined: Thu Dec 03, 2020 8:25 pm
Location: Denmark
Has thanked: 669 times
Been thanked: 173 times

Re: Creating custom touch keypads for gLCDs

Post by jgu1 »

Hi Martin!

First seen this now, I will also make a test :D

Thank´s

Br Jorgen

jgu1
Posts: 774
Joined: Thu Dec 03, 2020 8:25 pm
Location: Denmark
Has thanked: 669 times
Been thanked: 173 times

Re: Creating custom touch keypads for gLCDs

Post by jgu1 »

Hi Martin!

First I try to simulate, get the error init, and if I try to compile I also get error, the init is there?

:)

Br Jorgen
Attachments
DisplayManager WidgetArray Keypad Example.msg.txt
(570 Bytes) Downloaded 11 times
Macro.png
Macro.png (9.2 KiB) Viewed 3483 times
Simulation.png
Simulation.png (16.48 KiB) Viewed 3483 times

medelec35
Matrix Staff
Posts: 1913
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 619 times
Been thanked: 644 times

Re: Creating custom touch keypads for gLCDs

Post by medelec35 »

Hi Jorgen have you updated your components database so you have the latest Graphical LCD Manager?

Also Strings are being worked on.
As soon as they are completed, I will let you know.
Have you you tried the file from here?
Last edited by medelec35 on Wed Apr 02, 2025 3:17 pm, edited 1 time in total.
Reason: Removed link as it now better to run a Full database component library update.
Martin

daddytims_tims
Posts: 74
Joined: Thu Jun 16, 2022 6:16 pm
Has thanked: 110 times
Been thanked: 13 times

Flowcode v10 Re: Creating custom touch keypads for gLCDs

Post by daddytims_tims »

Hi medelec35

I also have a play with the keypad.
It worked out very well, Comes in handy for quite alot of stuffs


Thanks again


Regards

medelec35
Matrix Staff
Posts: 1913
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 619 times
Been thanked: 644 times

Re: Creating custom touch keypads for gLCDs

Post by medelec35 »

Thanks for letting us know.
It was a component I have wanted for sometime.
I'm glad it works very well, and I also use it within my projects.
Martin

Post Reply