Interrupt routine for remote switch in UIFlow
-
Putty, the walking robot can go forward or backwards. When walking, I cannot stop or switch direction using a remote switch, because I cannot interrupt the flow. An interrupt routine is needed I guess. I found examples for a H/W pin interrupt, but not for S/W. Can anyone please help me?
-
actually, we don't suggest putting the
loop
to the callback function. I think you could create a variable to save the current state, and then use the remote callback to change the state. -
Thank you. Don't understand what you suggest, but finally I got it working like this:
Maybe you have better idea! -
@werner_g that's what I mean. haha. you did it.