
障害物回避走行プログラム
Revision 4:3de68a2ed879, committed 2020-07-22
- Comitter:
- tomotsugu
- Date:
- Wed Jul 22 03:26:41 2020 +0000
- Parent:
- 3:85fb510925f5
- Child:
- 5:deb1a1066f53
- Commit message:
- avoidance
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Wed Jul 22 03:25:17 2020 +0000 +++ b/main.cpp Wed Jul 22 03:26:41 2020 +0000 @@ -8,17 +8,17 @@ Timer timer; // 距離計測用タイマー /* 障害物検知用の変数設定 */ -int SC; // 正面 -int SL; // 左 -int SR; // 右 -int SLD; // 左前 -int SRD; // 右前 -int flag = 0; // 障害物有無のフラグ -const int limit = 20;; // 障害物の距離のリミット(単位:cm) -int DT; // 距離 -int houkou; // 進行方向(1:前 2:左 3:右) -int max; // 最も遠い距離 -int i; // ループ変数 +int SC; // 正面 +int SL; // 左 +int SR; // 右 +int SLD; // 左前 +int SRD; // 右前 +int flag = 0; // 障害物有無のフラグ +const int limit = 20; // 障害物の距離のリミット(単位:cm) +int DT; // 距離 +int houkou; // 進行方向(1:前 2:左 3:右) +int max; // 最も遠い距離 +int i; // ループ変数 /* 超音波センサ関数 */ int watch(){