I already had the exact same code :o But, I think the reason mine was not working how it was supposed to, was because I was still running a timer and “Check Direction”
I will try it and update you with my results.
Thank you for the helpful video demonstration. That was pretty good, and very appreciated.
usually u set the pin input or output mode once.
make a init method and there you create the pi object (which is stored in a property then)
on your last screenshot i not see where you set pwm.
put your constants in a modul not in each button action.
you could visualize the motor pins output via LED first.