registered function on Timerchannel gets not executed
Posted: Tue Nov 24, 2015 8:28 pm
Hi,
i try to register a user defined function for a periodic timer interupt on the wipy.
This works:
This not. There is no error, the wipy just seems to ignore the handler silently.:
Am i missing something?
Thanks Thilo
i try to register a user defined function for a periodic timer interupt on the wipy.
This works:
Code: Select all
tim = Timer(1, mode=Timer.PERIODIC)
tim_a = tim.channel(Timer.A, freq=700)
tim_a.irq(handler=lambda t: pin_step.toggle())
This not. There is no error, the wipy just seems to ignore the handler silently.:
Code: Select all
def stepnext():
pin_step.toggle()
tim = Timer(1, mode=Timer.PERIODIC)
tim_a = tim.channel(Timer.A, freq=700)
tim_a.irq(handler=lambda t: stepnext())
#I also tried this:
#tim_a.irq(handler=stepnext())
Thanks Thilo