Leds1
Dependencies: mbed
Revision 0:ba1bd1c2656f, committed 2014-12-04
- Comitter:
- hollegha2
- Date:
- Thu Dec 04 10:10:46 2014 +0000
- Commit message:
- xx
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 Dec 04 10:10:46 2014 +0000 @@ -0,0 +1,25 @@ +#include "mbed.h" + +// Das DigitalOut-Objekt d17 mit dem Pin P1_6 am uC verbinden +// damit ist P1_6 als Ausgang geschaltet +DigitalOut d17(P1_6); +DigitalOut d18(P1_7); +DigitalOut d19(P1_12); +DigitalOut d20(P1_13); + +void main() +{ + // alle Ports definiert auf 0 setzen + d17.write(0); d18.write(0); + // d17.write(0); d17=0; bewirkt dasselbe + d19=0; d20=0; + // super simples Lauflicht# + while(1) + { + d17=1; + wait_ms(200); + d17=0; d18=1; + wait_ms(200); + d18=0; d19=0; + } +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Thu Dec 04 10:10:46 2014 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/552587b429a1 \ No newline at end of file