Tony Abbey
/
hackspace_awesomeness
shorter off time
Fork of hackspace_awesomeness by
main.cpp@0:1d9ecfc751ca, 2014-07-12 (annotated)
- Committer:
- spyclub
- Date:
- Sat Jul 12 13:48:13 2014 +0000
- Revision:
- 0:1d9ecfc751ca
- Child:
- 1:8bd923cbd0e5
Lets make things flash
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
spyclub | 0:1d9ecfc751ca | 1 | #include "mbed.h" |
spyclub | 0:1d9ecfc751ca | 2 | |
spyclub | 0:1d9ecfc751ca | 3 | DigitalOut redLED(LED1); |
spyclub | 0:1d9ecfc751ca | 4 | DigitalOut greenLED(LED2); |
spyclub | 0:1d9ecfc751ca | 5 | DigitalOut blueLED(LED3); |
spyclub | 0:1d9ecfc751ca | 6 | |
spyclub | 0:1d9ecfc751ca | 7 | int main() { |
spyclub | 0:1d9ecfc751ca | 8 | redLED = 1; |
spyclub | 0:1d9ecfc751ca | 9 | greenLED = 1; |
spyclub | 0:1d9ecfc751ca | 10 | blueLED = 1; |
spyclub | 0:1d9ecfc751ca | 11 | while(1) { |
spyclub | 0:1d9ecfc751ca | 12 | redLED = 0; |
spyclub | 0:1d9ecfc751ca | 13 | wait(2.0); |
spyclub | 0:1d9ecfc751ca | 14 | redLED = 1; |
spyclub | 0:1d9ecfc751ca | 15 | wait(2.0); |
spyclub | 0:1d9ecfc751ca | 16 | |
spyclub | 0:1d9ecfc751ca | 17 | greenLED = 0; |
spyclub | 0:1d9ecfc751ca | 18 | wait(2.0); |
spyclub | 0:1d9ecfc751ca | 19 | greenLED = 1; |
spyclub | 0:1d9ecfc751ca | 20 | wait(2.0); |
spyclub | 0:1d9ecfc751ca | 21 | |
spyclub | 0:1d9ecfc751ca | 22 | blueLED = 0; |
spyclub | 0:1d9ecfc751ca | 23 | wait(2.0); |
spyclub | 0:1d9ecfc751ca | 24 | blueLED = 1; |
spyclub | 0:1d9ecfc751ca | 25 | wait(2.0); |
spyclub | 0:1d9ecfc751ca | 26 | } |
spyclub | 0:1d9ecfc751ca | 27 | } |