回避行動用のプログラムです。 (モータードライバー+超音波センサー)

Dependencies:   ATP3012 mbed a HMC US015_2 getGPS

Committer:
ushiroji
Date:
Fri Dec 03 08:24:39 2021 +0000
Revision:
1:1c4c7cd015e8
Parent:
0:99f4fe3e21c6
first version

Who changed what in which revision?

UserRevisionLine numberNew contents of line
ushiroji 0:99f4fe3e21c6 1 #include "mbed.h"
ushiroji 0:99f4fe3e21c6 2 // 自作関数
ushiroji 0:99f4fe3e21c6 3 #include "Function.h"
ushiroji 0:99f4fe3e21c6 4
ushiroji 0:99f4fe3e21c6 5 int main() {
ushiroji 0:99f4fe3e21c6 6 while(1) {
ushiroji 0:99f4fe3e21c6 7 Move('2', 0.3);
ushiroji 0:99f4fe3e21c6 8 while(FrontGet()) {
ushiroji 0:99f4fe3e21c6 9 Move('1', 0); //停止
ushiroji 1:1c4c7cd015e8 10 Move('4', 0.2); //時計回り回転
ushiroji 1:1c4c7cd015e8 11 wait(0.5);
ushiroji 0:99f4fe3e21c6 12 Move('1', 0); //回転停止
ushiroji 0:99f4fe3e21c6 13 }
ushiroji 0:99f4fe3e21c6 14 }
ushiroji 0:99f4fe3e21c6 15 }