Andy Pomfret
/
UoY-32C-lab3-exercise
Template project for University of York ELE00032C Lab 3
main.cpp@3:d230011f6c3b, 2021-02-02 (annotated)
- Committer:
- ajp109
- Date:
- Tue Feb 02 20:55:13 2021 +0000
- Revision:
- 3:d230011f6c3b
- Parent:
- 2:64d80449da6d
- Child:
- 4:fb7a9c8b563e
Initial commit / lab3-exercise
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
ajp109 | 0:77209603a6fe | 1 | #include "mbed.h" |
ajp109 | 0:77209603a6fe | 2 | |
ajp109 | 3:d230011f6c3b | 3 | // Write your function here |
ajp109 | 2:64d80449da6d | 4 | |
ajp109 | 0:77209603a6fe | 5 | int main() |
ajp109 | 0:77209603a6fe | 6 | { |
ajp109 | 3:d230011f6c3b | 7 | // Initialise the digital pins D2 to D5 as outputs |
ajp109 | 3:d230011f6c3b | 8 | DigitalOut blue(D2); |
ajp109 | 3:d230011f6c3b | 9 | DigitalOut red(D3); |
ajp109 | 3:d230011f6c3b | 10 | DigitalOut green(D4); |
ajp109 | 3:d230011f6c3b | 11 | DigitalOut yellow(D5); |
ajp109 | 2:64d80449da6d | 12 | |
ajp109 | 3:d230011f6c3b | 13 | // Call your function here |
ajp109 | 3:d230011f6c3b | 14 | |
ajp109 | 3:d230011f6c3b | 15 | // Loop forever to avoid returning |
ajp109 | 0:77209603a6fe | 16 | while (true); |
ajp109 | 0:77209603a6fe | 17 | } |