this is simple digital in for ublox c027
Fork of DigitalIn_HelloWorld_Mbed by
main.cpp@3:e2f865861a7a, 2014-09-21 (annotated)
- Committer:
- mbedAustin
- Date:
- Sun Sep 21 19:20:53 2014 +0000
- Revision:
- 3:e2f865861a7a
- Parent:
- 0:aaf5a9d465fd
- Child:
- 4:a69bbacf287f
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 | 3: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 | } |