Page 174 - 완) I MDP 프로젝트 작품 보고서(전체과 1학년)1.6
P. 174

int  game_state=0;

            int  time_count=0;
            int  check_count=0;

            int  wait_count=0;
            int  game_time_count=GAME_TIME;

            int  put_motor_flag=0;



            void  Motor_control(void)
            {

                 if(UP_M_SW)
                 {

                       if(UP_LIMIT)  M_STOP;
                       else

                       {
                            if(RIGHT_M_SW)  M_RIGHT_UP;

                            else  if(LEFT_M_SW)  M_LEFT_UP;
                            else

                            {
                                 M_UP;

                            }
                       }

                 }
                 else  if(DOWN_M_SW)

                 {
                       if(DOWN_LIMIT) M_STOP;

                       else
                       {

                            if(RIGHT_M_SW)  M_RIGHT_DOWN;
                            else  if(LEFT_M_SW)  M_LEFT_DOWN;

                            else  M_DOWN;
                       }

                 }
                 else  if(LEFT_M_SW)




                                                         -  167  -
   169   170   171   172   173   174   175   176   177   178   179