Page 516 - 2
P. 516

delay_ms(2);
                        }
                    }
            }


            void motor_x() //x 축 만큼 이동
            {
                  for(j=0;j<motor_data_x[state_x];j++)
                {
                    for(i=0;i<4;i++)
                    {
                        step = cw[i];
                        delay_ms(2);
                    }
                }
            }


            void motor_rx() //x 축 만큼 되돌아오기
            {
                  for(j=0;j<motor_data_x[state_x];j++)
                {
                    for(i=0;i<4;i++)
                    {
                        step = ccw[i];
                        delay_ms(2);
                    }
                }
            }


            void motor_y() //y 축 만큼 이동
            {
                  for(j=0;j<motor_data_y[state_y];j++)
                {
                    for(i=0;i<4;i++)
                    {
                        step = cw2[i];
                        delay_ms(2);
                    }
                }
            }


            void motor_ry() //y 축 만큼 되돌아오기
            {
                  for(j=0;j<motor_data_y[state_y];j++)
                {


                                                         - 516 -
   511   512   513   514   515   516   517   518   519   520   521