Besa Mavriqi
/
Mbed_Dig_IO_A4_Laufdig
LaufDig] Erstelle mit Hilfe der DigitalOut ein Lauflicht mit den integrierten vier blauen LEDs.
Revision 0:a2597f850f20, committed 2020-01-27
- Comitter:
- besam
- Date:
- Mon Jan 27 14:48:50 2020 +0000
- Commit message:
- Letzte Version
Changed in this revision
Mbed_Dig_IO_A4_Laufdig.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 a2597f850f20 Mbed_Dig_IO_A4_Laufdig.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Mbed_Dig_IO_A4_Laufdig.cpp Mon Jan 27 14:48:50 2020 +0000 @@ -0,0 +1,25 @@ +#include "mbed.h" + +BusOut myleds(D0,D3,D6,D9,D11,D12,A1,A5); +//BusOut myleds(LED1,LED2,LED3,LED4); + +void laufdig(); + +int main() +{ + while(1) + { + laufdig(); + } +} + +void laufdig() +{ + myleds=1; + wait_ms(200); + for(int i=0;i<5;i++) + { + myleds=myleds<<1; + wait_ms(200); + } +} \ No newline at end of file
diff -r 000000000000 -r a2597f850f20 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Mon Jan 27 14:48:50 2020 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400 \ No newline at end of file