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:ef5555f028e6, committed 2014-04-07
- Comitter:
- tim004
- Date:
- Mon Apr 07 07:42:58 2014 +0000
- Commit message:
- LV6-PAI-Grupa1-Tim004-Zad2
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
| mbed.bld | Show annotated file Show diff for this revision Revisions of this file |
diff -r 000000000000 -r ef5555f028e6 main.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Mon Apr 07 07:42:58 2014 +0000
@@ -0,0 +1,42 @@
+#include "mbed.h"
+
+BusOut prikaz1(dp26,dp25,dp24,dp23);
+BusOut prikaz2(dp28,dp6,dp5,dp27);
+
+DigitalOut enable(dp14);
+InterruptIn taster(dp1);
+
+int brojac1(0);
+int brojac2(0);
+
+bool interrupt=false;
+Timer debounce;
+
+void play()
+{
+ if(debounce.read_ms()>200)
+ {
+ brojac2=(brojac2+1)%16;
+ debounce.reset();
+ }
+}
+
+Ticker stoper;
+
+void count()
+{
+ brojac1=(brojac1+1)%16;
+ prikaz1=brojac1;
+ prikaz2=brojac2;
+}
+
+int main()
+{
+ enable=0;
+ prikaz1=brojac1;
+ prikaz2=brojac2;
+ taster.rise(play);
+ debounce.start();
+ stoper.attach(count,0.2);
+ while(1) {}
+}
\ No newline at end of file
diff -r 000000000000 -r ef5555f028e6 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Mon Apr 07 07:42:58 2014 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/7d30d6019079 \ No newline at end of file