Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: Adafruit_GFX mbed
Fork of I2C_SSD1306_Helloworld_WIZwiki-W7500 by
Diff: interrupt.cpp
- Revision:
- 14:de61135af30f
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/interrupt.cpp Fri Oct 13 02:45:14 2017 +0000
@@ -0,0 +1,18 @@
+// Flash an LED while waiting for events
+
+#include "mbed.h"
+
+InterruptIn event(D5);
+DigitalOut led(D13);
+
+void trigger() {
+ printf("triggered!\n");
+}
+
+int main() {
+ event.rise(&trigger);
+ while(1) {
+ led = !led;
+ wait(0.25);
+ }
+}
