How to work with buttons without touch panel?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-02-22 3: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.
- Labels:
-
TouchGFX
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-02-22 3: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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-02-22 3:55 AM
Yes, you will find e.g. the UI Template Pool Demo within TouchGFX.
Regards
/Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-02-22 4: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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-02-22 4:28 AM
The buttons interact directly with the graphics. The buttons will be used to navigate through the menu of the graphical interface
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-03-01 1:16 AM
I’m working with TouchGFX and I have the state of a physical key, GPIO button, available when MB1642ButtonController::sample is called (în my case the class has another name). What is the simplest way to interact with TouchGFX based on this key state?
Specifically, I want to know:
Do I have to handle everything through code by manually triggering events for widgets?
Is there any way to map a key press (e.g., key "1") to a TouchGFX button press, similar to how the touch interface works, directly from the GUI?
Thanks in advance for any help or suggestions!
