- is there any function which can start or stop the work of timer.
for example
timer1.start()#which enable the timer running.
timer1.stop()#which disable the timer running. - is there any function could tell the extern interrupt is rising or falling ISR with the below code?
ext = ExtInt(Pin(‘A0’), ExtInt.IRQ_RISING_FALLING, Pin.PULL_NONE, callback)
class Timer – control hardware timers — MicroPython 1.22 documentation (openmv.io)
You can create virtual timers which can be disabled. Use -1 to make virtual ones.
As for the pin level, you can read the level in the code in the interrupt. In the C code I know this data is captured in a flags variable. But, it looks like the API is missing it externally in Python.
1 Like
roge that .thank you!