Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
You are viewing an older revision! See the latest version
Homepage
DreiLed¶
Programmbeschreibung: DreiLeds
Änderungen:
Datum: 06.12.19
dreiLed.cpp
#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;
}
}
}