  */
 void aw(char *pin, char *val) {
   Debug("aw");
-  
+
   int p = getPin(pin);
   pinMode(p, OUTPUT);
-  
-  if(p == -1) {
-    Debug("badpin");
-    return;
-  }
-  
+
+  if(p == -1) {
+    Debug("badpin");
+    return;
+  }
+
   analogWrite(p,atoi(val));
 }
 


  strncpy(cmd, messageBuffer, 2);
  cmd[2] = '\0';
  
  strncpy(pin, messageBuffer + 2, 2);
  pin[2] = '\0';

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

  switch (cmdid) {
    case 1 :  dw(pin,val);     break;
    case 2 :  dr(pin,val);     break;
    case 3 :  aw(pin,val);     break;
    case 4 :  ar(pin,val);     break;
    case 5 :  dht11Read(pin);  break;
    case 99: toggleDebug(val); break;
    default:                   break;
  }

 */
int getPin(char *pin) {
  int ret = -1;

  if(pin[0] == 'A' || pin[0] == 'a') {
    switch(pin[1]) {
      case '0': ret = A0; break;
      case '1': ret = A1; break;
      case '2': ret = A2; break;
      case '3': ret = A3; break;
      case '4': ret = A4; break;
      case '5': ret = A5; break;
      default:            break;
    }

  } else {
    ret = atoi(pin);

    if(ret == 0 && (pin[0] != '0' || pin[1] != '0')) {
      ret = -1;
    }
