last version

Dependencies:   mbed

https://os.mbed.com/teams/ABELI2019/code/Robin-Handy/

main.cpp

Committer:
rob117
Date:
2019-12-06
Revision:
0:c28a0d145b92

File content as of revision 0:c28a0d145b92:

#include "mbed.h"

DigitalOut led1(LED1);
DigitalOut led2(LED2);
DigitalOut led3(LED3);


int main() {
    while (1) {
        
    led1 = !led1;
    wait_ms(20);    //100 Hz   
        
    if (led1==0){    
    
    led2 = !led2;
    wait_ms(10);    //50 Hz  
    

     
        
    } 
    
    if((led1 == 1) && (led2 == 1))  //Wenn led1 und led2 leuchtet soll led3 leuchten
    {
        led3= !led3;
    }
        
        
    
}
    
    
   
}