Shruti Koparkar
/
test_blinky
LED blinky
main.cpp@1:4a71303b813e, 2015-02-10 (annotated)
- Committer:
- shrutimk
- Date:
- Tue Feb 10 05:03:54 2015 +0000
- Revision:
- 1:4a71303b813e
- Parent:
- 0:9c16a9754a72
- Child:
- 2:488f7e70d8b7
changing led from led_green to led1, led2 etc.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
shrutimk | 0:9c16a9754a72 | 1 | #include "mbed.h" |
shrutimk | 0:9c16a9754a72 | 2 | |
shrutimk | 1:4a71303b813e | 3 | DigitalOut led1(LED1); |
shrutimk | 1:4a71303b813e | 4 | DigitalOut led2(LED2); |
shrutimk | 0:9c16a9754a72 | 5 | |
shrutimk | 0:9c16a9754a72 | 6 | int main() |
shrutimk | 0:9c16a9754a72 | 7 | { |
shrutimk | 0:9c16a9754a72 | 8 | while (true) { |
shrutimk | 0:9c16a9754a72 | 9 | led1 = 1; // toggle led |
shrutimk | 0:9c16a9754a72 | 10 | led2 = 1; |
shrutimk | 0:9c16a9754a72 | 11 | wait(0.2); |
shrutimk | 0:9c16a9754a72 | 12 | led1 = 0; |
shrutimk | 0:9c16a9754a72 | 13 | led2 = 0; |
shrutimk | 0:9c16a9754a72 | 14 | wait(0.2); |
shrutimk | 0:9c16a9754a72 | 15 | } |
shrutimk | 0:9c16a9754a72 | 16 | } |