回避行動用のプログラムです。
Dependencies: ATP3012 mbed a HMC US015_2 getGPS
main.cpp@0:99f4fe3e21c6, 2021-12-01 (annotated)
- Committer:
- ushiroji
- Date:
- Wed Dec 01 08:14:01 2021 +0000
- Revision:
- 0:99f4fe3e21c6
- Child:
- 1:f70beec382b6
First version
Who changed what in which revision?
User | Revision | Line number | New 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 | xbee.printf("front get\n\r"); |
ushiroji | 0:99f4fe3e21c6 | 10 | Move('1', 0); //停止 |
ushiroji | 0:99f4fe3e21c6 | 11 | xbee.printf("mortor mode:1 speed:0\n\r"); |
ushiroji | 0:99f4fe3e21c6 | 12 | Move('4', 0.3); //時計回り回転 |
ushiroji | 0:99f4fe3e21c6 | 13 | xbee.printf("mortor mode:4 speed:0.5\n\r"); |
ushiroji | 0:99f4fe3e21c6 | 14 | wait(1); |
ushiroji | 0:99f4fe3e21c6 | 15 | Move('1', 0); //回転停止 |
ushiroji | 0:99f4fe3e21c6 | 16 | xbee.printf("mortor mode:1 speed:0\n\r"); |
ushiroji | 0:99f4fe3e21c6 | 17 | } |
ushiroji | 0:99f4fe3e21c6 | 18 | } |
ushiroji | 0:99f4fe3e21c6 | 19 | } |