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
Revision 0:ab7718445b3d, committed 2015-10-08
- Comitter:
- Voldread
- Date:
- Thu Oct 08 16:12:24 2015 +0000
- Commit message:
- Teller med leds
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 Thu Oct 08 16:12:24 2015 +0000
@@ -0,0 +1,28 @@
+#include "mbed.h"
+
+BusOut Leds(PA_9,PC_7,PB_6,PA_7,PA_6,PA_5,PB_5,PB_4);
+DigitalIn SW7(PB_3);
+DigitalIn SW6(PA_10);
+
+int main()
+{
+ int teller=0;
+ Leds=~teller;
+
+ while (true)
+ {
+ if (SW7==0)
+ { teller=teller+1;
+ Leds=~teller;
+ wait_ms(2);
+ while(SW7==0){wait_ms(1);};
+ }
+ if (SW6==0)
+ { teller=teller-1;
+ Leds=~teller;
+ wait_ms(2);
+ while(SW6==0){wait_ms(1);};
+
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Thu Oct 08 16:12:24 2015 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/ba1f97679dad \ No newline at end of file