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.
Dependencies: mbed
Diff: main.cpp
- Revision:
- 3:0989b6368529
- Parent:
- 2:9885740002da
--- a/main.cpp Fri Nov 08 16:54:04 2019 +0000
+++ b/main.cpp Mon Nov 11 12:44:03 2019 +0000
@@ -9,11 +9,25 @@
while(1) {
left = 100; //左モーター100%
right = 100;//右モーター100%
- wait(1.0);
- left = 30;//左30%
- right = 30;//右30%
- wait(1.0);
- printf("OK");
+ wait(3.0);
+ printf("直進\n\r");
+ left = -50;//左-50%(back)
+ right = -50;//右-50%
+ printf("バック\n\r");
+ wait(3.0);
+ left = 20; //左モーター10%
+ right = 100;//右モーター100%(右折)
+ printf("右折\n\r");
+ wait(3.0);
+ left = 100; //左モーター100%
+ right = 20;//右モーター10%(左折)
+ printf("左折\n\r");
+ wait(3.0);
+ left = 0; //左モーター100%
+ right = 0;//右モーター10%(左折)
+ printf("停止\n\r");
+ wait(3.0);
+ printf("OK\n\r");
}
}