 
 // =========== DC Control using the encoder.
 int targetpos = 0;
+int TORQUE=200;
 
 void setTargetPos(int newtargetpos)
 {
   targetpos = newtargetpos;
 }
 
-void updatedc(Adafruit_DCMotor *dcmotor, int currentpos)
+bool updatedc(Adafruit_DCMotor *dcmotor, int currentpos)
 {
   if (targetpos != currentpos)
   {
-    dcmotor->setSpeed(90);
+    dcmotor->setSpeed(TORQUE);
 
     if (targetpos < currentpos)
       dcmotor->run(FORWARD);
     else
       dcmotor->run(BACKWARD);
 
+    return false;
+
   } else {
     dcmotor->setSpeed(0);
+    return true;
   }
 
 }

  //AFMS.begin(1000);  // OR with a different frequency, say 1KHz

  wrist.servo.attach(10);
  elbow.servo.attach(9);

  pinMode(laserPin, OUTPUT);


      case '=':
        resetEncoderPos();
        targetpos=0;
        setTargetPos(90/10);
        elbow.tgtPos=90;
        wrist.tgtPos=90;
        homing=true;
        break;
      case 'A':
        readcommand(state,controlvalue);
