Skip to main content
Nhor.1
Associate
Apr 1, 2023 6:36 AM UTC
Question

change from screen1 to screen2 or from Screen2 to Screen1 on touchgfx

hello.

It is programmed to move from screen 1 to screen 2 with Button.

I would like to know how to move using gpio input.

thank you.

This topic has been closed for replies.

1 reply

MM..1
Super User
Apr 1, 2023 7:17 AM UTC

Create interactions on both screen assign to hardware button (if you use letters in simulator you can test with pc keyboard) For example from code roller choice 85 letter U

in model.cpp tick place hw gpio check

if (HAL_GPIO_ReadPin(SW_PWR_GPIO_Port, SW_PWR_Pin) == GPIO_PIN_RESET )
 {
	 static_cast<FrontendApplication*>(Application::getInstance())->handleKeyEvent(85);
 }