timer = machine.Timer(0)
Code: Select all
def handleInterrupt(timer):
global last
global e
global d
value = e.getValue()
d = value - last
last = value;
if d != 0:
print("rotary::" , str(d))
timer.init(period=200, mode=machine.Timer.PERIODIC, callback=handleInterrupt)
ampy -p com9 put main.py
I got "could not enter raw repl". If I removed main.py for esp8266 and reboot. the ampy woks.
Any solution for this?