Andy Pomfret
/
UoY-32C-lab3-exercise
Template project for University of York ELE00032C Lab 3
main.cpp@4:fb7a9c8b563e, 2021-02-02 (annotated)
- Committer:
- ajp109
- Date:
- Tue Feb 02 20:56:25 2021 +0000
- Revision:
- 4:fb7a9c8b563e
- Parent:
- 3:d230011f6c3b
Fix pins to match script
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 | 4:fb7a9c8b563e | 10 | DigitalOut yellow(D4); |
ajp109 | 4:fb7a9c8b563e | 11 | DigitalOut green(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 | } |