 
 bool debug = false;
 
-char request[12];
+char request[7];
 int index = 0;
 char cmd[3];
 char pin[3];

void process() {
  strncpy(cmd, request, 2);      cmd[2] = '\0';
  strncpy(pin, request + 2, 2);  pin[2] = '\0';

  if (atoi(cmd) > 90) {
    strncpy(val, request + 4, 2);
    val[2] = '\0';
    strncpy(aux, request + 6, 3);
    aux[3] = '\0';
  } else {
    strncpy(val, request + 4, 3);
    val[3] = '\0';
    strncpy(aux, request + 7, 3);
    aux[3] = '\0';
  }

  // if (debug) Serial.println(request);
  
  int p = getPin(pin);
  if (p == -1) return; // Should raise some kind of "bad pin" error.
  
  
  int cmdid = atoi(cmd);

  switch(cmdid) {
    case 0:  setMode    (p, val);       break;
    case 1:  dWrite     (p, val);       break;
    case 2:  dRead      (p);            break;
    case 3:  aWrite     (p, val);       break;
    case 4:  aRead      (p);            break;
    case 97: handlePing (p, val, aux);  break;
    case 98: handleServo(p, val, aux);  break;
    case 99: toggleDebug(val);          break;
    default:                            break;
  }



/*
 * Toggle debug mode
 */
void toggleDebug(char *val) {
