回避行動用のプログラムです。
Dependencies: ATP3012 mbed a HMC US015_2 getGPS
Diff: main.cpp
- Revision:
- 0:99f4fe3e21c6
- Child:
- 1:f70beec382b6
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Wed Dec 01 08:14:01 2021 +0000 @@ -0,0 +1,19 @@ +#include "mbed.h" +// 自作関数 +#include "Function.h" + +int main() { + while(1) { + Move('2', 0.3); + while(FrontGet()) { + xbee.printf("front get\n\r"); + Move('1', 0); //停止 + xbee.printf("mortor mode:1 speed:0\n\r"); + Move('4', 0.3); //時計回り回転 + xbee.printf("mortor mode:4 speed:0.5\n\r"); + wait(1); + Move('1', 0); //回転停止 + xbee.printf("mortor mode:1 speed:0\n\r"); + } + } +}