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@1:cab93cb2f242, 2017-06-23 (annotated)
- Committer:
- sarahmarshy
- Date:
- Fri Jun 23 16:07:16 2017 -0500
- Revision:
- 1:cab93cb2f242
- Parent:
- 0:248dfc85bbf9
"Update mbed-os"
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| mab5449 | 0:248dfc85bbf9 | 1 | #include "mbed.h" |
| mab5449 | 0:248dfc85bbf9 | 2 | |
| mab5449 | 0:248dfc85bbf9 | 3 | PwmOut led(LED2); |
| mab5449 | 0:248dfc85bbf9 | 4 | |
| mab5449 | 0:248dfc85bbf9 | 5 | int main() { |
| mab5449 | 0:248dfc85bbf9 | 6 | // specify period first, then everything else |
| mab5449 | 0:248dfc85bbf9 | 7 | led.period(4.0f); // 4 second period |
| mab5449 | 0:248dfc85bbf9 | 8 | led.pulsewidth(2); // 2 second pulse (on) |
| mab5449 | 0:248dfc85bbf9 | 9 | while(1); // led flashing |
| mab5449 | 0:248dfc85bbf9 | 10 | } |
| mab5449 | 0:248dfc85bbf9 | 11 |