M0_Übung_2c

Dependencies:   mbed

Fork of M0_Lektion02c by Gottfried Enenkel

main.cpp

Committer:
StefanSeebacher
Date:
2016-04-21
Revision:
3:73420e7ef6b0
Parent:
2:4d97fbc35b11

File content as of revision 3:73420e7ef6b0:

#include "mbed.h" 

// **** DEFINITIONEN ****

BusOut led(P1_8,P1_9,P1_10,P1_11);

 // **** HAUPTPROGRAMM ****
 
int main() 
{
    while(1)   
        {
            led=0x0;        //LED **** 0000
            wait(0.2);
            led=0x1;        //LED ***X 0001
            wait(0.2);
            led=0x2;        //LED **X* 0010        
            wait (0.2);
            led=0x4;        //LED *X** 0100
            wait (0.2);
            led=0x8;        //LED X*** 1000
            wait (0.2);
            
            //Zurück
            
            led=0x0;        //LED **** 0000
            wait (0.2);
            led=0x8;        //LED X*** 1000
            wait (0.2);
            led=0x4;        //LED *X** 0100
            wait (0.2);
            led=0x2;        //LED **X* 0010
            wait (0.2);
            led=0x1;        //LED ***X 0001
            wait (0.2);
            led=0x0;        //LED **** 0000
            wait (0.2);
            
        }
}
// **** ENDE ****