****
Dependencies: mbed
main.cpp@0:b9764c4c1160, 2015-10-09 (annotated)
- Committer:
- knut_johan
- Date:
- Fri Oct 09 15:09:58 2015 +0000
- Revision:
- 0:b9764c4c1160
l?reboka;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
knut_johan | 0:b9764c4c1160 | 1 | #include "mbed.h" |
knut_johan | 0:b9764c4c1160 | 2 | |
knut_johan | 0:b9764c4c1160 | 3 | DigitalOut redled(PA_5); |
knut_johan | 0:b9764c4c1160 | 4 | DigitalOut greenled(PA_6); |
knut_johan | 0:b9764c4c1160 | 5 | |
knut_johan | 0:b9764c4c1160 | 6 | int main() |
knut_johan | 0:b9764c4c1160 | 7 | { |
knut_johan | 0:b9764c4c1160 | 8 | while(1) { // while loop |
knut_johan | 0:b9764c4c1160 | 9 | redled=1; |
knut_johan | 0:b9764c4c1160 | 10 | greenled=0; |
knut_johan | 0:b9764c4c1160 | 11 | wait(0.5); |
knut_johan | 0:b9764c4c1160 | 12 | redled=0; |
knut_johan | 0:b9764c4c1160 | 13 | greenled=1; |
knut_johan | 0:b9764c4c1160 | 14 | wait(0.5); |
knut_johan | 0:b9764c4c1160 | 15 | } // end while loop |
knut_johan | 0:b9764c4c1160 | 16 | } |