   RovServo[RC_MOTOR_C].write(0);
   RovServo[RC_MOTOR_R].write(0);
 
+  pinMode(LED_PIN_L, PWM);
+  pinMode(LED_PIN_R, PWM);
+
+  analogWrite(LED_PIN_L, 0);
+  analogWrite(LED_PIN_R, 0);
 
   IsConnected = false;
 }
 
 
-
 void loop() 
 {
   static uint32_t tTime[8];
-
 
   //-- 명령어 수신 처리 
   //
   process_recv_cmd();
-
 
   #if USE_RC_SETUP ==  1
   rc_setup();

  RovSerial.SendCmd( &Cmd );
}



void recv_cmd_control( RSP_CMD_OBJ *pCmd )
{
  uint16_t Pwm[3];

  //-- 모터 제어 
  //
  Pwm[0] = (pCmd->Data[8]<<8) | (pCmd->Data[7]);
  Serial.print("RC : ");
  Serial.println(Pwm[0]);
  RovServo[RC_MOTOR_L].write(Pwm[0]);


  //-- LED 제어 
  //
}

    //시동 
    if( ch == 'o' )
    {
      rc_pwm_L = 0, rc_pwm_R = 0, rc_pwm_C = 0;
      RovServo[0].write(rc_pwm_L);
      RovServo[1].write(rc_pwm_C);
      RovServo[2].write(rc_pwm_R);
      Serial.println("Start");
    }
    //정지 (시동끄기)
    if( ch == 'p' )
    {
      rc_pwm_L = 0, rc_pwm_R = 0, rc_pwm_C = 0;
      RovServo[0].write(rc_pwm_L);
      RovServo[1].write(rc_pwm_C);
      RovServo[2].write(rc_pwm_R);
      Serial.println("Stop");
    }
    //전진 모터 가속
    if( ch == 'w' )
    {
      rc_pwm_L = constrain(rc_pwm_L++, 0, 1000);
      rc_pwm_R = constrain(rc_pwm_R++, 0, 1000);
      RovServo[0].write(rc_pwm_L);
      RovServo[2].write(rc_pwm_R);
      Serial.print("Left=");
      Serial.print(rc_pwm_L);
      Serial.print("  Right=");
      Serial.println(rc_pwm_R);
    }
    //전진 모터 감속
    if( ch == 's' )
    {
      rc_pwm_L = constrain(rc_pwm_L--, 0, 1000);
      rc_pwm_R = constrain(rc_pwm_R--, 0, 1000);
      RovServo[0].write(rc_pwm_L);
      RovServo[2].write(rc_pwm_R);
      Serial.print("Left=");
      Serial.print(rc_pwm_L);
      Serial.print("  Right=");
      Serial.println(rc_pwm_R);
    }
    //좌회전
    if( ch == 'a' )
    {
      rc_pwm_L = constrain(rc_pwm_L--, 0, 1000);      
      rc_pwm_R = constrain(rc_pwm_R++, 0, 1000);
      RovServo[0].write(rc_pwm_L);    //좌측모터 출력 감소
      RovServo[2].write(rc_pwm_R);    //우측모터 출력 증가
      Serial.print("Left=");
      Serial.print(rc_pwm_L);
      Serial.print("  Right=");
      Serial.println(rc_pwm_R);
    }
    //우회전
    if( ch == 'd' )
    {
      rc_pwm_L = constrain(rc_pwm_L++, 0, 1000);
      rc_pwm_R = constrain(rc_pwm_R--, 0, 1000);
      RovServo[0].write(rc_pwm_L);   // 좌측모터 출력 증가
      RovServo[2].write(rc_pwm_R);    //우측모터 출력 감소
      Serial.print("Left=");
      Serial.print(rc_pwm_L);
      Serial.print("  Right=");
      Serial.println(rc_pwm_R);
    }
    //상단모터 가속
    if( ch == 'q' )
    {
      rc_pwm_C = constrain(rc_pwm_C++, 0, 1000);
      RovServo[1].write(rc_pwm_C);  
      Serial.print("Center=");
      Serial.println(rc_pwm_C);
    }
    //상단모터 감속
    if( ch == 'e' )
    {
      rc_pwm_C = constrain(rc_pwm_C--, 0, 1000);
      RovServo[1].write(rc_pwm_C);   
      Serial.print("Center=");
      Serial.println(rc_pwm_C);
    }
    if(ch == 'b')
    {
      led_L = constrain(led_L+=255, 0, 65535);
      led_R = constrain(led_R+=255, 0, 65535);
      analogWrite(LED_PIN_L, led_L);
      analogWrite(LED_PIN_R, led_R);
      Serial.print("brighteness++");
      Serial.print(led_L);
      Serial.print("+++");
      Serial.println(led_R);
    }
    if(ch == 'v')
    {
      led_L = constrain(led_L-=255, 0, 65535);
      led_R = constrain(led_R-=255, 0, 65535);
      analogWrite(LED_PIN_L, led_L);
      analogWrite(LED_PIN_R, led_R);
      Serial.println("brighteness--");
      Serial.print(led_L);
      Serial.print("+++");
      Serial.println(led_R);
    }
 
  }

}
