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
Turbine.cpp@2:9d280856a536, 2017-05-19 (annotated)
- Committer:
- matthieuvignon
- Date:
- Fri May 19 08:06:49 2017 +0000
- Revision:
- 2:9d280856a536
Programme AX12 + verification position
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
matthieuvignon | 2:9d280856a536 | 1 | #include "mbed.h" |
matthieuvignon | 2:9d280856a536 | 2 | |
matthieuvignon | 2:9d280856a536 | 3 | extern PwmOut turbine; |
matthieuvignon | 2:9d280856a536 | 4 | extern void gerer_turbine(unsigned short pwm_turbine); |
matthieuvignon | 2:9d280856a536 | 5 | |
matthieuvignon | 2:9d280856a536 | 6 | extern DigitalOut led2; |
matthieuvignon | 2:9d280856a536 | 7 | |
matthieuvignon | 2:9d280856a536 | 8 | void gerer_turbine(unsigned char pwm_turbine) { |
matthieuvignon | 2:9d280856a536 | 9 | |
matthieuvignon | 2:9d280856a536 | 10 | turbine.period_ms(20); |
matthieuvignon | 2:9d280856a536 | 11 | |
matthieuvignon | 2:9d280856a536 | 12 | |
matthieuvignon | 2:9d280856a536 | 13 | if (pwm_turbine==0) |
matthieuvignon | 2:9d280856a536 | 14 | turbine.pulsewidth_us(800); |
matthieuvignon | 2:9d280856a536 | 15 | else if (pwm_turbine==1) { |
matthieuvignon | 2:9d280856a536 | 16 | turbine.pulsewidth_us(1000+(10*pwm_turbine)); |
matthieuvignon | 2:9d280856a536 | 17 | } |
matthieuvignon | 2:9d280856a536 | 18 | |
matthieuvignon | 2:9d280856a536 | 19 | } |