Updated for FZ429
Dependencies: mbed
main.cpp@3:e4903708d489, 2018-11-12 (annotated)
- Committer:
- noutram
- Date:
- Mon Nov 12 14:13:12 2018 +0000
- Revision:
- 3:e4903708d489
- Parent:
- 0:437c844cec26
Uses D6 (value PWM pin on the FZ429)
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
noutram | 0:437c844cec26 | 1 | #include "mbed.h" |
noutram | 0:437c844cec26 | 2 | |
noutram | 3:e4903708d489 | 3 | PwmOut pwmRed(D6); |
noutram | 0:437c844cec26 | 4 | |
noutram | 0:437c844cec26 | 5 | int T = 10; |
noutram | 0:437c844cec26 | 6 | int Tmark = 1; |
noutram | 0:437c844cec26 | 7 | |
noutram | 0:437c844cec26 | 8 | int main() { |
noutram | 0:437c844cec26 | 9 | |
noutram | 0:437c844cec26 | 10 | pwmRed.period_us(T); |
noutram | 0:437c844cec26 | 11 | pwmRed.pulsewidth_us(Tmark); |
noutram | 0:437c844cec26 | 12 | |
noutram | 0:437c844cec26 | 13 | while(1) { |
noutram | 0:437c844cec26 | 14 | sleep(); |
noutram | 0:437c844cec26 | 15 | } |
noutram | 0:437c844cec26 | 16 | } |