Nicholas Outram
/
Task523
Task 5.2.3
main.cpp@1:46c40448e55b, 2017-07-13 (annotated)
- Committer:
- noutram
- Date:
- Thu Jul 13 14:56:04 2017 +0000
- Revision:
- 1:46c40448e55b
- Parent:
- 0:437c844cec26
updated for mbed-os 5.5
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 | 0:437c844cec26 | 3 | PwmOut pwmRed(D7); |
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 | } |