   dlcs("FD 2000");
   
 }
+
+long sqr(long v) {
+  return v*v;
+}

AccelStepper stepperL(AccelStepper::HALF4WIRE, motorLPin1, motorLPin3, motorLPin2, motorLPin4);
AccelStepper stepperR(AccelStepper::HALF4WIRE, motorRPin1, motorRPin3, motorRPin2, motorRPin4);

Servo penliftServo;

long buzzEnd = 0;


void setup()

      SIG - sign Logobots name
    */  
  
  if (c.startsWith("TO")) {
    // split out x and y co-ordinates
    int sp = c.indexOf(" ",3);
    int x = c.substring(3,sp).toInt();
    int y = c.substring(sp+1).toInt();
    driveTo(x,y);
  } else if (c.startsWith("FD")) {
    int dist = c.substring(3).toInt();
    drive(dist);
  } else if (c.startsWith("BK")) {
    int dist = c.substring(3).toInt();
    drive(-dist);
  } else if (c.startsWith("RT")) {
    int angle = c.substring(3).toInt();
    turn(-angle);
  } else if (c.startsWith("LT")) {
    int angle = c.substring(3).toInt();
    turn(angle);
  } else if (c.startsWith("ST")) {
    stepperL.stop();
    stepperR.stop();
  } else if (c.startsWith("BZ")) {
    buzz(c.substring(3).toInt());
  } else if (c.startsWith("PU")) {
    penUp();
  } else if (c.startsWith("PD")) {
    penDown();
  } else if (c.startsWith("SIG")) {
    writeLogobot();
  } else if (c.startsWith("WT")) {
    writeText(c.substring(3));
  }
}

