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

sub3_2L;
                                    lv_L;
                                    delayRL;
                                    STOPD;STOPC;STOPG;
                                    lv_SP;
                            }
                }
            }


            //빈칸 찾는곳
            int find_bl()
            {
                    int i;

                    for(i=0 ; i<6 ; i++)
                            if(data[i] == B_L)
                                    break;

                    return  i;
            }

            //엘레베이터 층이동
            void lv_up(int move)
            {
                    if(move>=0&&move<=1)
                    {
                            while(!IR1)
                                    LV_UP;
                            HOLD;
                            state = 1;
                            data[move] = P_S;
                    }
                    else if(move>1&&move<=3)
                    {
                            while(!IR2)
                                    LV_UP;
                            HOLD;
                            state = 2;
                            data[move] = P_S;
                    }
                    else if(move<6)
                    {
                            while(!LIMIT_UP)
                                    LV_UP;
                            HOLD;
                            state = 3;



                                                         -  88  -
   90   91   92   93   94   95   96   97   98   99   100