Andy Pomfret
/
UoY-32C-lab3-exercise
Template project for University of York ELE00032C Lab 3
Diff: main.cpp
- Revision:
- 3:d230011f6c3b
- Parent:
- 2:64d80449da6d
- Child:
- 4:fb7a9c8b563e
--- a/main.cpp Tue Jan 12 15:24:52 2021 +0000 +++ b/main.cpp Tue Feb 02 20:55:13 2021 +0000 @@ -1,18 +1,17 @@ #include "mbed.h" -void test() { - int count = 3; - printf("In test(), count = %d\r\n", count); -} +// Write your function here int main() { - int count = 5; - - test(); + // Initialise the digital pins D2 to D5 as outputs + DigitalOut blue(D2); + DigitalOut red(D3); + DigitalOut green(D4); + DigitalOut yellow(D5); - printf("In main(), count = %d\r\n", count); - - // Do nothing, forever... + // Call your function here + + // Loop forever to avoid returning while (true); }