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
Fork of DigitalIn_HelloWorld_Mbed by
main.cpp@4:e2f865861a7a, 2014-09-21 (annotated)
- Committer:
- mbedAustin
- Date:
- Sun Sep 21 19:20:53 2014 +0000
- Revision:
- 4:e2f865861a7a
- Parent:
- 0:aaf5a9d465fd
- Child:
- 5:9b20ef58e04c
added comment for clarity
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| mbed_official | 0:aaf5a9d465fd | 1 | #include "mbed.h" |
| mbed_official | 0:aaf5a9d465fd | 2 | |
| mbed_official | 0:aaf5a9d465fd | 3 | DigitalIn enable(p5); |
| mbed_official | 0:aaf5a9d465fd | 4 | DigitalOut led(LED1); |
| mbed_official | 0:aaf5a9d465fd | 5 | |
| mbedAustin | 4:e2f865861a7a | 6 | // blink LED when enable line is high |
| mbed_official | 0:aaf5a9d465fd | 7 | int main() { |
| mbed_official | 0:aaf5a9d465fd | 8 | while(1) { |
| mbed_official | 0:aaf5a9d465fd | 9 | if(enable) { |
| mbed_official | 0:aaf5a9d465fd | 10 | led = !led; |
| mbed_official | 0:aaf5a9d465fd | 11 | } |
| mbed_official | 0:aaf5a9d465fd | 12 | wait(0.25); |
| mbed_official | 0:aaf5a9d465fd | 13 | } |
| mbed_official | 0:aaf5a9d465fd | 14 | } |
