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:369891f9a34f, committed 2016-01-21
- Comitter:
- DoTTi
- Date:
- Thu Jan 21 16:26:59 2016 +0000
- Commit message:
- DigitalIO Aufgabe 14
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 Jan 21 16:26:59 2016 +0000
@@ -0,0 +1,31 @@
+#include "mbed.h"
+
+DigitalOut myled(LED1);
+DigitalIn taster(P0_10);
+
+int main()
+{
+int counter=-1;
+int tasteralt=1;
+int tasterneu;
+
+ //taster.mode(PullUp);
+ wait(.001);
+ while(1) {
+ tasterneu = taster;
+ if ((tasterneu==0) && (tasteralt==1))
+ {
+ counter++;
+ }
+ if(counter ==10)
+ {
+ myled=1;
+ wait(1);
+ counter=0;
+ }
+ else{
+ myled=0;
+ }
+ tasteralt = tasterneu;
+ }
+}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Thu Jan 21 16:26:59 2016 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/6f327212ef96 \ No newline at end of file