M0_Übung_2a

Dependencies:   mbed

Fork of M0_Lektion02a by Gottfried Enenkel

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 #include "mbed.h" 
00002 
00003 // **** DEFINITIONEN ****
00004 
00005 DigitalOut LedD1 (P1_8);
00006 DigitalOut LedD2 (P1_9);
00007 DigitalOut LedD3  (P1_10);
00008 DigitalOut LedD4  (P1_11);
00009 
00010  // **** HAUPTPROGRAMM ****
00011  
00012 int main()
00013 {
00014     while(1)               
00015         {
00016             LedD1=1;       
00017             wait(0.4);     
00018             LedD1=0;      
00019             LedD2=1;                    
00020             wait (0.4);    
00021             LedD2=0;
00022             LedD3=1;
00023             wait (0.4);
00024             LedD3=0;
00025             LedD4=1;
00026             wait (0.4);
00027             LedD4=0;
00028             wait (0.4);   
00029             
00030             //Zürick
00031                    
00032             LedD4=1;
00033             wait (0.4);
00034             LedD4=0;
00035             LedD3=1;
00036             wait (0.4);
00037             LedD3=0;
00038             LedD2=1;
00039             wait (0.4);
00040             LedD2=0;
00041             LedD1=1;
00042             wait (0.4);
00043             LedD1=0;
00044             wait (0.4);
00045             
00046         }
00047 }
00048 // **** ENDE ****