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@1:b753d93bb3bc, 2017-01-13 (annotated)
- Committer:
- lucamiari
- Date:
- Fri Jan 13 12:29:17 2017 +0000
- Revision:
- 1:b753d93bb3bc
- Parent:
- 0:f2c16d5d42f0
- Child:
- 2:b48990e8b6cb
prova commit2
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| lucamiari | 0:f2c16d5d42f0 | 1 | #include "mbed.h" |
| lucamiari | 0:f2c16d5d42f0 | 2 | |
| lucamiari | 1:b753d93bb3bc | 3 | Serial pc(USBTX, USBRX); |
| lucamiari | 1:b753d93bb3bc | 4 | |
| lucamiari | 0:f2c16d5d42f0 | 5 | DigitalOut myled(LED1); |
| lucamiari | 0:f2c16d5d42f0 | 6 | |
| lucamiari | 0:f2c16d5d42f0 | 7 | int main() { |
| lucamiari | 0:f2c16d5d42f0 | 8 | while(1) { |
| lucamiari | 0:f2c16d5d42f0 | 9 | myled = 1; // LED is ON |
| lucamiari | 0:f2c16d5d42f0 | 10 | wait(0.2); // 200 ms |
| lucamiari | 0:f2c16d5d42f0 | 11 | myled = 0; // LED is OFF |
| lucamiari | 0:f2c16d5d42f0 | 12 | wait(1.0); // 1 sec |
| lucamiari | 0:f2c16d5d42f0 | 13 | } |
| lucamiari | 0:f2c16d5d42f0 | 14 | } |