motor test

Dependencies:   omni_wheel PID jy901 solenoid aqm0802 camera beep kohiMD linesSnsor lpf RCJESC

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 #include "mbed.h"
00002 #include "robot.h"
00003 #include "sensorGen.h"
00004 #include "aqm0802.h"
00005 #include "beep.h"
00006 
00007 sensor sensor;
00008 robot robo;
00009 
00010 int main() {
00011     const bool test = true;
00012     while(1) {
00013         if (!test) //test
00014         {
00015             if () //白線踏んでない
00016             {
00017                 if () //ボール持ってない 
00018                 {
00019                     if () //ボール見えてる -> chaseBall
00020                     {
00021                         robo.chaseBall( , );
00022                     }
00023                     else //ボールみえてない -> searchBall
00024                     {
00025                         robo.searchBall();
00026                     }
00027                 }
00028                 else //ボール持ってる
00029                 {
00030                     if () //ゴール見える -> moveGoal
00031                     {
00032                         robo.moveGoal();
00033                     }
00034                     else //ゴール見えない -> detour
00035                     {
00036                         robo.detour();
00037                     }
00038                 }
00039             }
00040             else //踏んだ
00041             {
00042                 
00043             }
00044         } else {
00045             test();
00046         }
00047     }
00048 }