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.
Revision 3:600b3ff627a2, committed 2021-05-06
- Comitter:
- CSTritt
- Date:
- Thu May 06 13:44:45 2021 +0000
- Parent:
- 2:7709000dbbc4
- Commit message:
- Minor clean-up for smoother motion and quieter waiting.
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Thu May 06 02:22:30 2021 +0000
+++ b/main.cpp Thu May 06 13:44:45 2021 +0000
@@ -14,14 +14,14 @@
int main() {
for (int q=1; q < 6; q++) {
- for (float p=0; p < 1.0; p += 0.1) {
+ for (double p = 0; p < 1.0; p += 0.05) {
myServo = p;
- wait(0.2);
+ wait(0.1);
}
}
while (true) {
float hold = 0.5;
myServo = hold; // Wait here forever.
- wait(0.2);
+ wait(1.0);
}
}
\ No newline at end of file