Ganesh Gore
/
01_LED_Blink
Sample Code
main.cpp@0:b3c59d833033, 2014-05-17 (annotated)
- Committer:
- ganeshgore
- Date:
- Sat May 17 15:43:53 2014 +0000
- Revision:
- 0:b3c59d833033
ExampleRevision;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
ganeshgore | 0:b3c59d833033 | 1 | #include "mbed.h" |
ganeshgore | 0:b3c59d833033 | 2 | |
ganeshgore | 0:b3c59d833033 | 3 | DigitalOut myled(p25); |
ganeshgore | 0:b3c59d833033 | 4 | |
ganeshgore | 0:b3c59d833033 | 5 | DigitalOut myled1(LED3); |
ganeshgore | 0:b3c59d833033 | 6 | |
ganeshgore | 0:b3c59d833033 | 7 | int main() { |
ganeshgore | 0:b3c59d833033 | 8 | while(1) { |
ganeshgore | 0:b3c59d833033 | 9 | myled = 1; |
ganeshgore | 0:b3c59d833033 | 10 | myled1 = 1; |
ganeshgore | 0:b3c59d833033 | 11 | wait(2); |
ganeshgore | 0:b3c59d833033 | 12 | myled = 0; |
ganeshgore | 0:b3c59d833033 | 13 | myled1 = 0; |
ganeshgore | 0:b3c59d833033 | 14 | wait(2); |
ganeshgore | 0:b3c59d833033 | 15 | } |
ganeshgore | 0:b3c59d833033 | 16 | } |