 void toggleDebug(char *val) {
   if (atoi(val) == 0) {
     debug = false;
-    Serial.println("goodbye");
+    response = "goodbye";
   } else {
     debug = true;
-    Serial.println("hello");
+    response = "hello";
   }
 }
 

 * attach, detach, write, read, writeMicroseconds, attached
 */
void handleServo(char *pin, char *val, char *aux) {
  if (debug) Serial.println("ss");
  int p = getPin(pin);
  if(p == -1) { if(debug) Serial.println("badpin"); return; }
  Serial.println("signal: servo");

  // 00(0) Detach
  if (atoi(val) == 0) {
    servo.detach();
    char m[12];
    sprintf(m, "%s::detached", pin);
    Serial.println(m);

  // 01(1) Attach
  } else if (atoi(val) == 1) {

    servo.attach(p);
    char m[12];
    sprintf(m, "%s::attached", pin);
    response = m;

  // 02(2) Write
  } else if (atoi(val) == 2) {
    // Write to servo
    servo.write(atoi(aux));
    delay(15);

  // 03(3) Read
  } else if (atoi(val) == 3) {
    int sval = servo.read();
    char m[13];
    sprintf(m, "%s::read::%03d", pin, sval);
    response = m;
  }
}

