M0_Übung_2g

Dependencies:   mbed

Fork of M0_Lektion02g by Gottfried Enenkel

main.cpp

Committer:
StefanSeebacher
Date:
2016-04-21
Revision:
1:266e62978a24
Parent:
0:b04485efd862

File content as of revision 1:266e62978a24:

#include "mbed.h" 

// **** DEFINITIONEN ****

BusOut led(P1_13,P1_12,P1_7,P1_6,P1_4,P1_3,P1_1,P1_0,LED4,LED3,LED2,LED1);

int I;

// **** HAUPTPROGRAMM ****

int main() {
    while(1) 
        {
            I=0;
            led=0x800;          //LED   0000 0000 0001
            for (I=0;I<12;I=I++) // Schleife von i=0; solange i kleiner als 12;
                                 // erhöhe i bei jedem Durchgang um 1
            {
                wait(0.2);
                led=led<<2;      // verschiebe das BIT um eins Richtung MSB
            }
            
        }
}
// **** ENDE ****