2023-02-13 05:02 AM
void Screen2View::up1()
{
if (buttonWithIcon1.getPressedState()==true) HAL_GPIO_WritePin(GPIOD, GPIO_PIN_6,GPIO_PIN_RESET);
else HAL_GPIO_WritePin(GPIOD, GPIO_PIN_6,GPIO_PIN_SET);
}
what is wrong, thans for help
2023-02-13 07:59 PM
Hi,
Could you give a bit more information on how you set this up and what is the error you are facing ? have you properly defined those pins, included the hal, what is the "up1" function, when is it called, etc
This video from Gustavo might be of help as well. It explains how to communicate between the hardware and TouchGFX, in this case a LED is toggled for example when a button is pressed.
/Romain
2023-02-14 02:22 AM
Beginners should start with beginner topics, not a huge and complex projects...
2023-02-14 02:32 AM
hi,
Function "up1" is named lifting up the blinds.
in my code is no errors but it not works. I just want to change value from high to low on my pin PD6 when I pushing the "buttonWithIcon1" and I dont know how correctly use "IF" in this case?
/Lucas
2023-02-14 06:32 PM
Are you sure your up1 function is actually called first ? Could you add a printf and see if you go inside this function and if it reacts as you want when the button is pressed ?
/Romain