Brian Starkey
/
mbed_multifile
main.cpp@0:b02b54a87eab, 2017-01-02 (annotated)
- Committer:
- usedbytes
- Date:
- Mon Jan 02 11:34:49 2017 +0000
- Revision:
- 0:b02b54a87eab
Initial commit;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
usedbytes | 0:b02b54a87eab | 1 | #include "mbed.h" |
usedbytes | 0:b02b54a87eab | 2 | /* Include the second_file declarations */ |
usedbytes | 0:b02b54a87eab | 3 | #include "second_file.h" |
usedbytes | 0:b02b54a87eab | 4 | |
usedbytes | 0:b02b54a87eab | 5 | DigitalOut myled(LED1); |
usedbytes | 0:b02b54a87eab | 6 | |
usedbytes | 0:b02b54a87eab | 7 | int main() { |
usedbytes | 0:b02b54a87eab | 8 | int x = 2; |
usedbytes | 0:b02b54a87eab | 9 | |
usedbytes | 0:b02b54a87eab | 10 | while(1) { |
usedbytes | 0:b02b54a87eab | 11 | myled = 1; |
usedbytes | 0:b02b54a87eab | 12 | wait(0.2); |
usedbytes | 0:b02b54a87eab | 13 | myled = 0; |
usedbytes | 0:b02b54a87eab | 14 | wait(0.2); |
usedbytes | 0:b02b54a87eab | 15 | |
usedbytes | 0:b02b54a87eab | 16 | /* Call function in secondfile */ |
usedbytes | 0:b02b54a87eab | 17 | x = square(x); |
usedbytes | 0:b02b54a87eab | 18 | } |
usedbytes | 0:b02b54a87eab | 19 | } |