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:d3bfa1bf691e, 2018-08-30 (annotated)
- Committer:
- MigueAut
- Date:
- Thu Aug 30 01:19:16 2018 +0000
- Revision:
- 0:d3bfa1bf691e
pwm
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| MigueAut | 0:d3bfa1bf691e | 1 | #include "mbed.h" |
| MigueAut | 0:d3bfa1bf691e | 2 | |
| MigueAut | 0:d3bfa1bf691e | 3 | DigitalOut myled(LED1); |
| MigueAut | 0:d3bfa1bf691e | 4 | |
| MigueAut | 0:d3bfa1bf691e | 5 | int main() { |
| MigueAut | 0:d3bfa1bf691e | 6 | while(1) { |
| MigueAut | 0:d3bfa1bf691e | 7 | myled = 1; // LED is ON |
| MigueAut | 0:d3bfa1bf691e | 8 | wait(0.2); // 200 ms |
| MigueAut | 0:d3bfa1bf691e | 9 | myled = 0; // LED is OFF |
| MigueAut | 0:d3bfa1bf691e | 10 | wait(1.0); // 1 sec |
| MigueAut | 0:d3bfa1bf691e | 11 | } |
| MigueAut | 0:d3bfa1bf691e | 12 | } |