Deepsleep and wakeup on the same pin
I'm experimenting with a button to bring my Wipy to deepsleep and wakeup. Both are working individually, but not together. After going into deepsleep it immediately wakes up again. I guess the problem is due to the bouncing. I thought that I could solve the problem by setting the wakeup PIN just before going to sleep and after sufficient time to get passed by the bouncing. But that didn't work. See code below. Anybody suggestions?
if int(p_in()) == 0:
print("Setting %s to listen for wakeup" % (arg.id()))
print("Going into deepsleep: %s" % (arg.id()))
p_in = Pin('P3', mode=Pin.IN, pull=Pin.PULL_UP)
Solved: just needed to increase the timeout to 2 seconds before setting
and then going into deepsleep