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

 */
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;
    }

 */
void ar(char *pin, char *val) {
  Debug("ar");

  int p = getPin(pin);

  if(p == -1) {
    Debug("badpin");
    return;
  }

  pinMode(p, INPUT);
  int rval = analogRead(p);

  Serial.println(pin);
  if (pin == "A0") {
    Serial.println("yeahh");
  }

  char m[8];
  sprintf(m, "%s::%03d", pin, rval);
  Serial.println(m);
