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: mbed
Diff: main.cpp
- Revision:
- 0:a7fe10523b91
- Child:
- 1:b9d180275f1a
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Thu Sep 10 08:30:45 2015 +0000
@@ -0,0 +1,33 @@
+#include "mbed.h"
+
+BusOut Leds(PA_9,PC_7,PB_6,PA_7,PA_6,PA_5,PB_5,PB_4);
+InterruptIn SW7(PB_3);
+
+Timer timer1;
+
+static int teller = 0;
+
+void SW7_Pushed()
+{
+ teller++;
+
+}
+
+int main()
+{
+
+ SW7.fall(&SW7_Pushed);
+
+ while (true)
+ {
+ timer1.start();
+ if(timer1.read_ms() == 500)
+ {
+ timer1.stop();
+ timer1.reset();
+ Leds = ~teller;
+ teller = 0;
+ }
+
+ }
+}
\ No newline at end of file