M0_Übung_3a

Dependencies:   mbed

Fork of M0_Lektion03a 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 ledGR(p5);   
00006 DigitalOut ledBL(p34);  
00007 DigitalOut ledRT(p36);  
00008 
00009 // **** HAUPTPROGRAMM ****
00010 
00011 int main()
00012 {
00013     while(1) {
00014         ledGR = 0;   
00015         ledBL = 0;
00016         ledRT = 0;
00017         wait(2);  
00018  
00019         ledGR = 1;   
00020         ledBL = 1;
00021         ledRT = 0;
00022         wait(0.5);
00023  
00024         ledRT  = 1; 
00025         ledGR  = 1; 
00026         ledBL  = 0;
00027         wait(1);
00028         
00029         ledRT  = 1; 
00030         ledGR  = 1;
00031         ledBL  = 1; 
00032         wait(1);
00033         
00034         ledRT = 1; 
00035         ledGR = 1;
00036         ledBL = 0;
00037         wait(1);
00038         
00039         ledRT  = 1; 
00040         ledGR  = 1;
00041         ledBL  = 1; 
00042         wait(1);
00043         
00044         ledRT = 1; 
00045         ledGR = 0;
00046         ledBL = 1;
00047         wait(1);
00048         
00049         ledRT  = 1; 
00050         ledGR  = 1;
00051         ledBL  = 1; 
00052         wait(1);
00053         
00054         ledRT = 1; 
00055         ledGR = 0;
00056         ledBL = 1;
00057         wait(1);
00058         
00059         ledRT  = 1; 
00060         ledGR  = 1;
00061         ledBL  = 1; 
00062         wait(1);
00063         
00064         ledRT = 1; 
00065         ledGR = 0;
00066         ledBL = 1;
00067         wait(1);
00068         
00069         ledRT  = 1; 
00070         ledGR  = 1;
00071         ledBL  = 1; 
00072         wait(1);
00073         
00074         wait(3);
00075     }
00076 }
00077 // **** ENDE ****