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:4d8b265728c9, 2019-02-20 (annotated)
- Committer:
- fabiofaria
- Date:
- Wed Feb 20 15:50:04 2019 +0000
- Revision:
- 0:4d8b265728c9
- Child:
- 1:1e85a02fe11a
Initial commit.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
fabiofaria | 0:4d8b265728c9 | 1 | #include "mbed.h" |
fabiofaria | 0:4d8b265728c9 | 2 | |
fabiofaria | 0:4d8b265728c9 | 3 | DigitalOut myled(LED1); |
fabiofaria | 0:4d8b265728c9 | 4 | |
fabiofaria | 0:4d8b265728c9 | 5 | int main() { |
fabiofaria | 0:4d8b265728c9 | 6 | while(1) { |
fabiofaria | 0:4d8b265728c9 | 7 | myled = 1; // LED is ON |
fabiofaria | 0:4d8b265728c9 | 8 | wait(0.2); // 200 ms |
fabiofaria | 0:4d8b265728c9 | 9 | myled = 0; // LED is OFF |
fabiofaria | 0:4d8b265728c9 | 10 | wait(1.0); // 1 sec |
fabiofaria | 0:4d8b265728c9 | 11 | } |
fabiofaria | 0:4d8b265728c9 | 12 | } |