The ARMmbed class that will be used in this section is:
-
InterruptIn - Trigger an event when a digital input pin changes
Further documentation on this class can be found on the ARMmbed Handbook webpage (https://developer.mbed.org/handbook/Homepage).
The following example programs will demonstrate the principles of using a digital input pin as an external interrupt: