Brian Starkey
/
mbed_multifile
Diff: main.cpp
- Revision:
- 0:b02b54a87eab
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Mon Jan 02 11:34:49 2017 +0000 @@ -0,0 +1,19 @@ +#include "mbed.h" +/* Include the second_file declarations */ +#include "second_file.h" + +DigitalOut myled(LED1); + +int main() { + int x = 2; + + while(1) { + myled = 1; + wait(0.2); + myled = 0; + wait(0.2); + + /* Call function in secondfile */ + x = square(x); + } +}