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.
Revision 0:53943f6ccacf, committed 2014-03-10
- Comitter:
- TimeString
- Date:
- Mon Mar 10 23:05:27 2014 +0000
- Child:
- 1:fe05f0673d8b
- Commit message:
- mbed interrupt example
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/SLCD.lib Mon Mar 10 23:05:27 2014 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/Sissors/code/SLCD/#6e3c11967108
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Mon Mar 10 23:05:27 2014 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/8e73be2a2ac1 \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed_digital_pin_interruption_receiver.cpp Mon Mar 10 23:05:27 2014 +0000
@@ -0,0 +1,49 @@
+#include "mbed.h"
+#include "SLCD.h"
+
+/*
+SLCD slcd;
+
+int main() {
+
+ DigitalIn gpo(D1);
+ DigitalOut led(LED_RED);
+ DigitalOut led1(LED1);
+
+ slcd.printf("7777");
+
+ led1 = 0;
+
+ while (true) {
+ if (gpo == 1)
+ led1 = 1;
+ else
+ led1 = 0;
+ }
+}
+*/
+//----------------------------------------------
+
+SLCD slcd;
+DigitalOut led(LED_RED);
+DigitalOut led1(LED1);
+InterruptIn gpo(D2);
+
+int count = 0;
+
+void flip() {
+ led = !led;
+ count++;
+ slcd.printf("%4d", count);
+}
+
+int main() {
+ slcd.printf("8888");
+
+ gpo.rise(&flip);
+ while (true) {
+ led = !led;
+ //slcd.printf("");
+ wait(0.5);
+ }
+}
\ No newline at end of file