Robert Harrell
/
HelloWorld-HW1
publish test with HW1
Fork of HelloWorld by
main.cpp@2:0ce54f153548, 2014-02-03 (annotated)
- Committer:
- robertwharrell
- Date:
- Mon Feb 03 05:51:19 2014 +0000
- Revision:
- 2:0ce54f153548
- Parent:
- 0:fb6bbc10ffa0
- Child:
- 3:01c820a84ba3
hw1
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
simon | 0:fb6bbc10ffa0 | 1 | #include "mbed.h" |
simon | 0:fb6bbc10ffa0 | 2 | |
robertwharrell | 2:0ce54f153548 | 3 | DigitalOut led0(LED1); |
robertwharrell | 2:0ce54f153548 | 4 | DigitalOut led1(LED2); |
robertwharrell | 2:0ce54f153548 | 5 | DigitalOut led2(LED3); |
robertwharrell | 2:0ce54f153548 | 6 | DigitalOut led3(LED4); |
simon | 0:fb6bbc10ffa0 | 7 | |
simon | 0:fb6bbc10ffa0 | 8 | int main() { |
simon | 0:fb6bbc10ffa0 | 9 | while(1) { |
robertwharrell | 2:0ce54f153548 | 10 | for(int count=0; count < 16; count++) { |
robertwharrell | 2:0ce54f153548 | 11 | led0 = count & 0x1; |
robertwharrell | 2:0ce54f153548 | 12 | led1 = count & 0x2; |
robertwharrell | 2:0ce54f153548 | 13 | led2 = count & 0x4; |
robertwharrell | 2:0ce54f153548 | 14 | led3 = count & 0x8; |
robertwharrell | 2:0ce54f153548 | 15 | wait(1); |
robertwharrell | 2:0ce54f153548 | 16 | } |
simon | 0:fb6bbc10ffa0 | 17 | } |
simon | 0:fb6bbc10ffa0 | 18 | } |