Hi,
I am working on a port of an Arduino library to Micropython, and am having some difficulty, I think this is because the Arduino library uses pin change interrupts, and Micropython does not seem to support that. Falling or Rising Edge does not get me the results I need.
Is there a way that Micropython can do this now, or will be able to it in the future?
8-Dale
Pin change interrupts for PyBoard v1.1?
Re: Pin change interrupts for PyBoard v1.1?
The STM32F4 used by the pyboard has a module called EXTINT, and the micropython support for that is documented here:
https://docs.micropython.org/en/latest/ ... xtInt.html
This is capable is generating interrupts on rising or falling edges, or both, but not on levels.
Note that there are 16 lines, and you need to look at the cpu pin to figure out which line is used. C5 uses line 5, and B4 uses line 4. This means that you can't have ExtInt configured for both C4 and B4, only one or the other. You can use the quick reference to determine the cpu pins for a given pin: https://docs.micropython.org/en/latest/ ... ckref.html
https://docs.micropython.org/en/latest/ ... xtInt.html
This is capable is generating interrupts on rising or falling edges, or both, but not on levels.
Note that there are 16 lines, and you need to look at the cpu pin to figure out which line is used. C5 uses line 5, and B4 uses line 4. This means that you can't have ExtInt configured for both C4 and B4, only one or the other. You can use the quick reference to determine the cpu pins for a given pin: https://docs.micropython.org/en/latest/ ... ckref.html