LAUFLICHT via HEX BUS
Dependencies: mbed
Fork of _B14_Lektion02d by
main.cpp@1:1b6e8646461b, 2015-01-25 (annotated)
- Committer:
- Enenkel
- Date:
- Sun Jan 25 17:26:42 2015 +0000
- Revision:
- 1:1b6e8646461b
- Parent:
- 0:d1b86ac9a8cd
- Child:
- 2:04b13c71e1b9
Luaflicht D10-D13
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Enenkel | 0:d1b86ac9a8cd | 1 | /*********************************** |
Enenkel | 1:1b6e8646461b | 2 | name: BERTL_2014_TEST Lauflicht |
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 | 1:1b6e8646461b | 11 | DigitalOut ledD10(P1_8); //dem uP - Port 1 Pin 8 den Namen ledD10 zuweisen |
Enenkel | 1:1b6e8646461b | 12 | DigitalOut ledD11(P1_9); |
Enenkel | 1:1b6e8646461b | 13 | DigitalOut ledD12(P1_10); |
Enenkel | 1:1b6e8646461b | 14 | DigitalOut ledD13(P1_11); |
Enenkel | 0:d1b86ac9a8cd | 15 | |
Enenkel | 0:d1b86ac9a8cd | 16 | // ******* Hauptroutine ******** |
Enenkel | 0:d1b86ac9a8cd | 17 | int main() { // Start Hauptprogramm |
Enenkel | 1:1b6e8646461b | 18 | ledD10 = ledD11 = ledD12 = ledD13 =0; |
Enenkel | 0:d1b86ac9a8cd | 19 | while(1) { // Anfang der Schleife (ohne Abbruch) |
Enenkel | 1:1b6e8646461b | 20 | ledD10 = 1; // LED D10 einschalten |
Enenkel | 1:1b6e8646461b | 21 | wait(0.5); // warte 0.5 Sec. |
Enenkel | 1:1b6e8646461b | 22 | ledD10 = 0; |
Enenkel | 1:1b6e8646461b | 23 | ledD11 = 1; |
Enenkel | 1:1b6e8646461b | 24 | wait(0.5); |
Enenkel | 1:1b6e8646461b | 25 | ledD11 = 0; |
Enenkel | 1:1b6e8646461b | 26 | ledD12 = 1; |
Enenkel | 1:1b6e8646461b | 27 | wait(0.5); |
Enenkel | 1:1b6e8646461b | 28 | ledD12 = 0; |
Enenkel | 1:1b6e8646461b | 29 | ledD13 = 1; |
Enenkel | 1:1b6e8646461b | 30 | wait (0.5); // warte 0.5 Sekunde |
Enenkel | 1:1b6e8646461b | 31 | ledD13 = 0; |
Enenkel | 1:1b6e8646461b | 32 | } // Springe zum Anfang der Schleife |
Enenkel | 0:d1b86ac9a8cd | 33 | } // Ende Hauptprogramm |
Enenkel | 0:d1b86ac9a8cd | 34 | // ******* Ende ********* |
Enenkel | 0:d1b86ac9a8cd | 35 | |
Enenkel | 0:d1b86ac9a8cd | 36 | |
Enenkel | 0:d1b86ac9a8cd | 37 |