cancel
Showing results for 
Search instead for 
Did you mean: 

How to work with buttons without touch panel?

EBond.1
Associate

Hi, I recently started learning TouchGFX. And faced with the need to use the graphics work with the screen without the Touch panel. Instead, there will be physical buttons. Is there an example of how to implement this?

1 ACCEPTED SOLUTION

Accepted Solutions
Alexandre RENOUX
Principal

Hello Ebond.1,

You can also have a look at the Application Template for G0-Nucleo available in TouchGFX Designer. There, you will find the implementation of external buttons with TouchGFX since the screen is not touchable. The file to look at is Core/Src/ MB1642ButtonController.cpp and TouchGFX/target/TouchGFXHAL.cpp.

Hope this will help,

/Alexandre

View solution in original post

5 REPLIES 5
Andrew Neil
Evangelist III

Surely, in that case, your TouchGFX just becomes an output-only project - the buttons are entirely separate, and nothing to do with the graphics?

Peter BENSCH
ST Employee

Yes, you will find e.g. the UI Template Pool Demo within TouchGFX.

Regards

/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
Romain DIELEMAN
ST Employee

Hi,

You can look at the backend communication article in the documentation. It will help you understand how to communicate between your UI and your physical buttons. There are also projects you can download and look at.

There is also a good video online made by Gustavo from ST which will help you do this. In his project he communicates both ways: from a physical button to the UI to make a box appear/disappear, and from the UI to turn a LED on/off.

/Romain

The buttons interact directly with the graphics. The buttons will be used to navigate through the menu of the graphical interface

Alexandre RENOUX
Principal

Hello Ebond.1,

You can also have a look at the Application Template for G0-Nucleo available in TouchGFX Designer. There, you will find the implementation of external buttons with TouchGFX since the screen is not touchable. The file to look at is Core/Src/ MB1642ButtonController.cpp and TouchGFX/target/TouchGFXHAL.cpp.

Hope this will help,

/Alexandre