Hallo World mit 1 LED blinken

Dependencies:   mbed

Fork of _Lektion_01 by BULME_HIMBED

main.cpp

Committer:
Matthias_Praja
Date:
2016-01-08
Revision:
3:c9bfffe4f141
Parent:
2:619cddfe256e

File content as of revision 3:c9bfffe4f141:


#include "mbed.h"               
                                
// Konstante ********************** 
DigitalOut LedD10 (P1_8);    // LED D10 bis D13 IO Definieren
DigitalOut LedD11 (P1_9);
DigitalOut LedD12 (P1_10);
DigitalOut LedD13 (P1_11);
 // Hauptprogramm ******************
int main(void) {                
    while(1) {                 
                 
        
    LedD10 = 1;             //L-R LED EIN 
    wait(0.1); 
    
    LedD11 = 1;              
    wait(0.1);

    LedD12 = 1;              
    wait(0.1);

    LedD13 = 1;              
    wait(0.1);



    LedD10 = 0;              //L-R LED AUS
    wait(0.1);

    LedD11 = 0;              
    wait(0.1);

    LedD12 = 0;              
    wait(0.1);                       
               
    LedD13 = 0;              
    wait(0.1);
             
    wait(0.1);                //Warten
             
    LedD13 = 1;              //R-L LED EIN
    wait(0.1);
    
    LedD12 = 1;              
    wait(0.1);
    
    LedD11 = 1;              
    wait(0.1);
    
    LedD10 = 1;              
    wait(0.1);
    
    
    LedD13 = 0;              //R-L LED AUS
    wait(0.1);
    
    LedD12 = 0;              
    wait(0.1);
    
    LedD11 = 0;              
    wait(0.1);
    
    LedD10 = 0;              
    wait(0.1);
            
    wait(0.1);                //Warten 
    }
}
// ENDE ***************************