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.
Fork of test_carteAToutFaire_PR by
Diff: Turbine.cpp
- Revision:
- 2:9d280856a536
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Turbine.cpp Fri May 19 08:06:49 2017 +0000 @@ -0,0 +1,19 @@ +#include "mbed.h" + +extern PwmOut turbine; +extern void gerer_turbine(unsigned short pwm_turbine); + +extern DigitalOut led2; + +void gerer_turbine(unsigned char pwm_turbine) { + + turbine.period_ms(20); + + + if (pwm_turbine==0) + turbine.pulsewidth_us(800); + else if (pwm_turbine==1) { + turbine.pulsewidth_us(1000+(10*pwm_turbine)); + } + +} \ No newline at end of file