Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
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 |
diff -r 7bbc230e00d6 -r b33bff7dc3ea main.cpp --- 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); + } } }
diff -r 7bbc230e00d6 -r b33bff7dc3ea mbed.bld --- 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