![](/media/cache/group/Mbed-100-mk2_WXmQNC1.png.50x50_q85.png)
DigitalIn Hello World
Dependencies: mbed
Fork of DigitalIn_HelloWorld_Mbed by
main.cpp@0:aaf5a9d465fd, 2013-02-13 (annotated)
- Committer:
- mbed_official
- Date:
- Wed Feb 13 16:09:04 2013 +0000
- Revision:
- 0:aaf5a9d465fd
digitalIn hello world
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 | |
mbed_official | 0:aaf5a9d465fd | 6 | int main() { |
mbed_official | 0:aaf5a9d465fd | 7 | while(1) { |
mbed_official | 0:aaf5a9d465fd | 8 | if(enable) { |
mbed_official | 0:aaf5a9d465fd | 9 | led = !led; |
mbed_official | 0:aaf5a9d465fd | 10 | } |
mbed_official | 0:aaf5a9d465fd | 11 | wait(0.25); |
mbed_official | 0:aaf5a9d465fd | 12 | } |
mbed_official | 0:aaf5a9d465fd | 13 | } |