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.
Dependencies: mbed
main.cpp@0:09d45bf5fa77, 2015-07-31 (annotated)
- Committer:
- surey
- Date:
- Fri Jul 31 02:32:52 2015 +0000
- Revision:
- 0:09d45bf5fa77
example pwm;
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| surey | 0:09d45bf5fa77 | 1 | #include "mbed.h" |
| surey | 0:09d45bf5fa77 | 2 | |
| surey | 0:09d45bf5fa77 | 3 | PwmOut led(p21); |
| surey | 0:09d45bf5fa77 | 4 | |
| surey | 0:09d45bf5fa77 | 5 | int main() { |
| surey | 0:09d45bf5fa77 | 6 | while(1) { |
| surey | 0:09d45bf5fa77 | 7 | for(float p = 0.0f; p < 1.0f; p += 0.4f) |
| surey | 0:09d45bf5fa77 | 8 | { |
| surey | 0:09d45bf5fa77 | 9 | led = p; |
| surey | 0:09d45bf5fa77 | 10 | wait(2); |
| surey | 0:09d45bf5fa77 | 11 | } |
| surey | 0:09d45bf5fa77 | 12 | } |
| surey | 0:09d45bf5fa77 | 13 | } |
| surey | 0:09d45bf5fa77 | 14 |