2021-02-22 03:41 AM
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?
Solved! Go to Solution.
2021-02-22 11:15 PM
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
2021-02-22 03:53 AM
Surely, in that case, your TouchGFX just becomes an output-only project - the buttons are entirely separate, and nothing to do with the graphics?
2021-02-22 03:55 AM
Yes, you will find e.g. the UI Template Pool Demo within TouchGFX.
Regards
/Peter
2021-02-22 04:07 AM
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
2021-02-22 04:28 AM
The buttons interact directly with the graphics. The buttons will be used to navigate through the menu of the graphical interface
2021-02-22 11:15 PM
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