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: Motorsteuerung.cpp
- Revision:
- 12:bad33209d1bb
- Parent:
- 11:7dfdb8074992
- Child:
- 13:565aa2c6bd3d
--- a/Motorsteuerung.cpp Tue Jun 09 11:17:32 2015 +0000 +++ b/Motorsteuerung.cpp Tue Jun 23 10:49:55 2015 +0000 @@ -5,15 +5,11 @@ PwmOut mypwm(PWM_OUT); //For output PWM-pin AnalogIn analog_value0(A0); //For reading Hall-Sensor ADC-PIN -void motoransteuerung() -{ - - mypwm.period_us(PERIODEN_DAUER); // - +void motoransteuerung(){ + mypwm.period_us(PERIODEN_DAUER); while(1) { if(break_value==0) { mypwm.pulsewidth_us(PERIODEN_DAUER*hall_umrechnung()); //How often to change between High and low per Period. + } } } -} -} \ No newline at end of file