Re: object-oriented programming
Posted: Mon Apr 27, 2015 7:56 am
With an other pins it works,
But the switch callback
only starts one time.
Which is the best solution to stop the scheduler with a push button (the USR or an hardware interrupt (a button I can braze on other pins)
(and restart it)
But the switch callback
Code: Select all
# USR Schalter
print ('INIT des Schalters')
switch = pyb.Switch()
def switchcallback():
print('INFO-Switch: Switch Callback aufgerufen!')
switch.callback(lambda :switchcallback())
Which is the best solution to stop the scheduler with a push button (the USR or an hardware interrupt (a button I can braze on other pins)
(and restart it)