How to use InterruptIn
Can someone post a simple program using InterruptIn. I can't find a simple program that is easy to understand. I've seen a few ones that use a rising edge button but it appears the interrupt is always active and they also use outdated functions like wait.
Would also appreciate any explanation to the code. Additional Q: how can a beginner learn Mbed with the latest version. Anything I find online is outdated and won't work on the latest version. I've purchased arm courses but they suck. Most of the books I've tried are outdated also. Hard times lol.
Posted May 29, 2021, 4:14 AM UTC
42
I have not used mbed yet. However quick google search led me to their official documentation which looks quite nice.
https://os.mbed.com/docs/mbed-os/v6.11/introduction/index.html
Please notice a dropdown list in the top left corner. You can select mbed version there. Currently v6.11 is the latest.
As for InterruptIn I have found this page in the documentation:
https://os.mbed.com/docs/mbed-os/v6.11/apis/interruptin.html
I see at least 2 possible ways of disabling the interrupt.
Thanks, I have tried both those links yesterday and I was completely lost as to how the program was functioning. I just realised that I did not turn on the pullup resistor for my output led. This meant the led was going crazy.
Adding the pullup activation, it works perfectly. Thanks for the help.