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.
main.cpp@0:437c844cec26, 2015-09-24 (annotated)
- Committer:
- noutram
- Date:
- Thu Sep 24 12:31:39 2015 +0000
- Revision:
- 0:437c844cec26
Initial version 24-09-2015
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 | } |