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
Diff: Beleuchtungssteuerung.cpp
- Revision:
- 8:fb6cb712eb52
- Child:
- 9:b1bf6699d610
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Beleuchtungssteuerung.cpp Tue May 26 12:14:44 2015 +0000
@@ -0,0 +1,25 @@
+# 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
+ }
+
+ }
\ No newline at end of file