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.
Dependencies: mbed
Beleuchtungssteuerung.cpp
- Committer:
- thorb3n
- Date:
- 2015-05-26
- Revision:
- 8:fb6cb712eb52
- Child:
- 9:b1bf6699d610
File content as of revision 8:fb6cb712eb52:
# include "mbed.h"
# include "Prototypen.h"
PwmOut pwm_Licht(PWM_PORT);// Edit Pin-Port for the frontlight mosfet
DigitalOut bremsen(PA_6); // Edit Pin-Port for the backlight
Timer timer;
Bremse_blinken(){
int bremse;
bremse = break_value(); // reads break value
bremsen=0;
while(bremse){ // starts if break value = 1
timer.start();
if(timer.read()>0.5){ // backlight(bremsen) blinks with 1 Hz
bremsen=!bremsen;
timer.reset();
}
}
}
Vorderlicht_steuerung(){
pwm_Licht.period_us(10000);
while(1){
pwm_Licht.pulsewidth_us(10000*0.5);// Bluetooth eingabe einfügen
}
}