3/2/2017 4:21 PM | |
Posts: 215 Rating: (6) |
How can I detect a falling edge on the User button (=user button was pressed)? I tried writing a function that compares the payload of the input with the previous state and then incrementing a count tag, which is then send to the User LED output. Didn't work. Then I just tried analyzing the output of the user button fct. Didn't work either. The user LED should either change color with every push of the button or switch off and stay off (when count >3)
Do you have any hints for me? ------------------------------------------------------------------------------------------ |
Last edited by: Min_Moderator at: 3/3/2017 12:04:39 PMNew subject after splitting |
|
4/19/2017 5:39 PM | |
Posts: 69 Rating: (0) |
Hi, your code works perfectly for me. Did you set your UpdateInterval for the UserButton to a short duration, e.g. 1ms? Edit: And of course your "If" has to be in small letters. |
Last edited by: U_4676c112-3676-47ea-8c86-7248b328cc61 at: 4/19/2017 5:39:46 PMLast edited by: U_4676c112-3676-47ea-8c86-7248b328cc61 at: 4/19/2017 5:50:32 PMLast edited by: U_4676c112-3676-47ea-8c86-7248b328cc61 at: 4/19/2017 5:50:42 PM |
|
Follow us on