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 2:a3df98386c21, committed 2021-10-25
- Comitter:
- prof_al
- Date:
- Mon Oct 25 10:14:30 2021 +0000
- Parent:
- 1:9792cfe2330a
- Commit message:
- Version_1_1
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Mon Oct 25 10:01:29 2021 +0000 +++ b/main.cpp Mon Oct 25 10:14:30 2021 +0000 @@ -16,9 +16,12 @@ #include "cdef.h" /* Vereinbarungen zu den Tasteneingängen */ -DigitalIn pinButton1(D9); +DigitalIn pinSW1(D8); /* Ausgänge als "BUS" konfigurieren */ +BusOut bLedBus(/*A3,*/ A4, D2, D5, D4, D3); + +/* Ausgänge als Einzelleitung festlegen */ DigitalOut pinRed1(A3); @@ -46,11 +49,13 @@ ***************************************************************************/ int main() { while(1){ - if(pinButton1 == 0){ - pinRed1 = 1; + if(pinSW1 == 0){ + bLedBus = 0x10; + pinRed1 = 0; } else{ - pinRed1 = 0; + bLedBus = 0x00; + pinRed1 = 1; } } }