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.
Diff: main.cpp
- Revision:
- 0:78eeb27924f4
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Wed May 21 12:14:56 2014 +0000
@@ -0,0 +1,48 @@
+#include "mbed.h"
+#include "C12832_lcd.h"
+
+C12832_LCD lcd;
+
+BusOut myleds(LED1, LED2, LED3, LED4);
+
+InterruptIn button_up(p15);
+InterruptIn button_down(p12);
+InterruptIn button_left(p13);
+
+int i = 0;
+
+void out()
+{
+ myleds = i;
+}
+
+void count()
+{
+ i++;
+ out();
+}
+
+void discount()
+{
+ i--;
+ out();
+}
+
+void clear()
+{
+ i = 0;
+ out();
+}
+
+int main()
+{
+ button_up.rise(&count);
+ button_down.fall(&discount);
+ button_left.rise(&clear);
+
+ while(1)
+ {}
+}
+
+
+
\ No newline at end of file