Robert Harrell
/
HelloWorld-HW1
publish test with HW1
Fork of HelloWorld by
main.cpp@3:01c820a84ba3, 2014-02-03 (annotated)
- Committer:
- robertwharrell
- Date:
- Mon Feb 03 06:01:22 2014 +0000
- Revision:
- 3:01c820a84ba3
- Parent:
- 2:0ce54f153548
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 | 3:01c820a84ba3 | 3 | DigitalOut led0(LED4); |
robertwharrell | 3:01c820a84ba3 | 4 | DigitalOut led1(LED3); |
robertwharrell | 3:01c820a84ba3 | 5 | DigitalOut led2(LED2); |
robertwharrell | 3:01c820a84ba3 | 6 | DigitalOut led3(LED1); |
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 | } |