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.
Diff: main.cpp
- Revision:
- 1:5c26d3744592
- Parent:
- 0:500d22d1efeb
- Child:
- 2:47477c2b1925
diff -r 500d22d1efeb -r 5c26d3744592 main.cpp
--- a/main.cpp Thu Nov 15 06:19:52 2018 +0000
+++ b/main.cpp Thu Nov 15 06:40:44 2018 +0000
@@ -67,6 +67,15 @@
ledLL = 0b10;
}
+void go_straight_CL(){ //CLのみでトレース
+ Mrighti = 1;
+ Mrightp = (1.3 - KP * pl) * 1.0f;
+ Mlefti = 1;
+ Mleftp = (KP * pl + 0.3) * 1.0f;
+ ledRR = 0b10;
+ ledLL = 0b11;
+}
+
void turn_right(){
Mrighti = 2;
Mrightp = 0.05f;
@@ -197,6 +206,9 @@
#endif
} else
go_straight_p();
+// go_straight_CR();
+// go_straight_CL();
+
if( sensor[0] < blackL && sensor[3] < blackR){
stop_point_ver2();
break;