Kevin Abraham
/
4180Lab2-10
ECE 4180 Lab 2 Part 10
Fork of Motor_HelloWorld by
Revision 1:b33bff7dc3ea, committed 2018-10-09
- Comitter:
- abraha2d
- Date:
- Tue Oct 09 00:50:42 2018 +0000
- Parent:
- 0:7bbc230e00d6
- Commit message:
- Save point
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
mbed.bld | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Tue Nov 23 16:19:19 2010 +0000 +++ b/main.cpp Tue Oct 09 00:50:42 2018 +0000 @@ -5,9 +5,16 @@ Motor m(p23, p6, p5); // pwm, fwd, rev -int main() { - for (float s= -1.0; s < 1.0 ; s += 0.01) { - m.speed(s); - wait(0.02); +int main() +{ + while (1) { + for (float s= -1.0; s < 1.0 ; s += 0.01) { + m.speed(s); + wait(0.02); + } + for (float s= 1.0; s > -1.0 ; s -= 0.01) { + m.speed(s); + wait(0.02); + } } }
--- a/mbed.bld Tue Nov 23 16:19:19 2010 +0000 +++ b/mbed.bld Tue Oct 09 00:50:42 2018 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/mbed_official/code/mbed/builds/e2ac27c8e93e +https://os.mbed.com/users/mbed_official/code/mbed/builds/e95d10626187 \ No newline at end of file