Bertl 2014 Übung
Dependencies: mbed
Fork of _B14Test2 by
main.cpp@0:d1b86ac9a8cd, 2014-11-13 (annotated)
- Committer:
- Enenkel
- Date:
- Thu Nov 13 18:19:10 2014 +0000
- Revision:
- 0:d1b86ac9a8cd
- Child:
- 1:1b6e8646461b
LED D10 - D13 blinken im Sek Takt
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Enenkel | 0:d1b86ac9a8cd | 1 | /*********************************** |
Enenkel | 0:d1b86ac9a8cd | 2 | name: BERTL_2014_TEST |
Enenkel | 0:d1b86ac9a8cd | 3 | author: Gottfried Enenkel HTL BULME |
Enenkel | 0:d1b86ac9a8cd | 4 | email: ene@bulme.at |
Enenkel | 0:d1b86ac9a8cd | 5 | description: |
Enenkel | 0:d1b86ac9a8cd | 6 | LEDS D10 - D13 blinken im sec Takt |
Enenkel | 0:d1b86ac9a8cd | 7 | |
Enenkel | 0:d1b86ac9a8cd | 8 | ***********************************/ |
Enenkel | 0:d1b86ac9a8cd | 9 | #include "mbed.h" |
Enenkel | 0:d1b86ac9a8cd | 10 | // ******* Definitionen ******** |
Enenkel | 0:d1b86ac9a8cd | 11 | DigitalOut ledD10(LED1); //dem uP - Ausgang LED1 den Namen ledD10 zuweisen |
Enenkel | 0:d1b86ac9a8cd | 12 | DigitalOut ledD11(LED2); |
Enenkel | 0:d1b86ac9a8cd | 13 | DigitalOut ledD12(LED3); |
Enenkel | 0:d1b86ac9a8cd | 14 | DigitalOut ledD13(LED4); |
Enenkel | 0:d1b86ac9a8cd | 15 | |
Enenkel | 0:d1b86ac9a8cd | 16 | // ******* Hauptroutine ******** |
Enenkel | 0:d1b86ac9a8cd | 17 | int main() { // Start Hauptprogramm |
Enenkel | 0:d1b86ac9a8cd | 18 | |
Enenkel | 0:d1b86ac9a8cd | 19 | while(1) { // Anfang der Schleife (ohne Abbruch) |
Enenkel | 0:d1b86ac9a8cd | 20 | ledD10 =1; // LED D10 einschalten |
Enenkel | 0:d1b86ac9a8cd | 21 | ledD11 = ledD12 = ledD13 =1; |
Enenkel | 0:d1b86ac9a8cd | 22 | wait (1); // warte 1 Sekunde |
Enenkel | 0:d1b86ac9a8cd | 23 | ledD10=0; // LED D10 ausschalten |
Enenkel | 0:d1b86ac9a8cd | 24 | ledD11 = ledD12 = ledD13 =0; |
Enenkel | 0:d1b86ac9a8cd | 25 | wait (1); // warte 1 Sekunde |
Enenkel | 0:d1b86ac9a8cd | 26 | } // Springe zum Anfang der Schleife |
Enenkel | 0:d1b86ac9a8cd | 27 | } // Ende Hauptprogramm |
Enenkel | 0:d1b86ac9a8cd | 28 | // ******* Ende ********* |
Enenkel | 0:d1b86ac9a8cd | 29 | |
Enenkel | 0:d1b86ac9a8cd | 30 | |
Enenkel | 0:d1b86ac9a8cd | 31 |