Skip to main content
Andreea
Associate
Feb 4, 2020 11:39 AM UTC
Question

How to interface physical buttons through the editor?

Hello. I am currently trying to interface physical buttons with my UI, by using interactions directly from the designer, like so:

When hardware button is clicked > BUTTON KEY > Change screen

I am brand new in this software and embedded software in general, thus my question is, for BUTTON KEY, what do the numbers mean? How do I access specific digital pins on my board?

Any help is greatly appreciated.

P.S. I'm working on a STM32F746G-DISCOVERY board.

This topic has been closed for replies.

8 replies

Martin KJELDSEN
Principal III
Feb 5, 2020 10:52 AM UTC

Maybe i should do a writeup on this. All the way from CubeMX to Designer.

In a nutshell, you tell your .touchgfx file what the different keys "mean", which values they'll have. These values are received through your implementation of ButtonController which you'll configure on a TouchGFX HAL. That ButtonController will then sample some GPIO port and return the value, for a key, that you defined in your .touchgfx file - Creating a link between hardware and designer interaction (which translates to a handleKeyEvent() ).

I'll try to get more concrete when i have time.

/Martin

Andreea
AndreeaAuthor
Associate
Feb 5, 2020 10:55 AM UTC

Hi Martin,

Thanks a lot, it's getting closer to what I need. Do you think it could be possible to include some kind of demo of it in the next webinar?

Martin KJELDSEN
Principal III
Feb 5, 2020 11:53 AM UTC

Potentially! I'm not sure what the webinar plan is :)

Martin KJELDSEN
Principal III
Feb 5, 2020 1:44 PM UTC

Maybe i'll do a video guide once i get some "free" time.

/Martin

Andreea
AndreeaAuthor
Associate
Feb 11, 2020 9:40 AM UTC

That would be Great !!!

Martin KJELDSEN
Principal III
Feb 17, 2020 9:51 AM UTC

Since we don't be going to Embedded World, i'll make an effort to do a video on this i think.

/Martin

Andreea
AndreeaAuthor
Associate
Feb 17, 2020 9:54 AM UTC

Sounds good. Do you have any idea when we can expect this video to air? :smiling_face_with_smiling_eyes:

Martin KJELDSEN
Principal III
Feb 17, 2020 10:24 AM UTC

When EW was supposed to end for us, is my guess :D End of this month. I won't start until EW starts.

/Martin