Kevin Abraham
/
4180Lab2-9
ECE 4180 Lab 2 Part 9
Fork of Servo_HelloWorld by
Revision 2:4609f408d050, committed 2018-10-09
- Comitter:
- abraha2d
- Date:
- Tue Oct 09 00:50:21 2018 +0000
- Parent:
- 1:40d2fd0b99e6
- 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 |
diff -r 40d2fd0b99e6 -r 4609f408d050 main.cpp --- a/main.cpp Tue Nov 23 16:10:35 2010 +0000 +++ b/main.cpp Tue Oct 09 00:50:21 2018 +0000 @@ -5,9 +5,16 @@ Servo myservo(p21); -int main() { - for(float p=0; p<1.0; p += 0.1) { - myservo = p; - wait(0.2); +int main() +{ + while (1) { + for(float p=0; p<1.0; p += 0.1) { + myservo = p; + wait(0.2); + } + for(float p=1.0; p>0; p -= 0.1) { + myservo = p; + wait(0.2); + } } }
diff -r 40d2fd0b99e6 -r 4609f408d050 mbed.bld --- a/mbed.bld Tue Nov 23 16:10:35 2010 +0000 +++ b/mbed.bld Tue Oct 09 00:50:21 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