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:865f35716c5d, committed 2014-04-07
- Comitter:
- tim010
- Date:
- Mon Apr 07 17:21:46 2014 +0000
- Commit message:
- LV6 - PAI - Grupa4 - Tim010
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 |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Mon Apr 07 17:21:46 2014 +0000
@@ -0,0 +1,41 @@
+#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);
+
+Timer tajmer;
+Ticker stoperica;
+
+void BrojiKlik() {
+ if(tajmer.read_ms() > 200) brojac2=(brojac2+1)%16;
+ tajmer.reset();
+ }
+
+ void Brojac() {
+ brojac1=(brojac1+1)%16;
+ prikaz1=brojac1;
+ prikaz2=brojac2;
+}
+
+
+
+int main()
+{
+ enable=0;
+ prikaz1=brojac1;
+ prikaz2=brojac2;
+ taster.rise(&BrojiKlik);
+ tajmer.start();
+ stoperica.attach(Brojac, 0.2);
+
+ while(1) {
+
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Mon Apr 07 17:21:46 2014 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/7d30d6019079 \ No newline at end of file