Andy Pomfret
/
UoY-32C-lab5-motor
Template project for University of York ELE00032C Lab 5
main.cpp@0:77209603a6fe, 2021-01-11 (annotated)
- Committer:
- ajp109
- Date:
- Mon Jan 11 11:28:11 2021 +0000
- Revision:
- 0:77209603a6fe
- Child:
- 1:f32fea0468ad
Initial commit
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 | 0:77209603a6fe | 3 | int main() |
ajp109 | 0:77209603a6fe | 4 | { |
ajp109 | 0:77209603a6fe | 5 | int x = 4; |
ajp109 | 0:77209603a6fe | 6 | x = 6; |
ajp109 | 0:77209603a6fe | 7 | int y; |
ajp109 | 0:77209603a6fe | 8 | y = 2*x; |
ajp109 | 0:77209603a6fe | 9 | x = 7; |
ajp109 | 0:77209603a6fe | 10 | |
ajp109 | 0:77209603a6fe | 11 | printf("x:%d y:%d\n", x, y); |
ajp109 | 0:77209603a6fe | 12 | |
ajp109 | 0:77209603a6fe | 13 | // Do nothing, forever... |
ajp109 | 0:77209603a6fe | 14 | while (true); |
ajp109 | 0:77209603a6fe | 15 | } |