           pan /= 'z' - 'a';
           pan = (pan>1023)?1023:pan;
           SetPosition(PAN,pan);
+          Serial.print("pan: ");
+          Serial.println( pan );
       }
 
       if ( inByte >= '1' && inByte <= '9' ) {

    turret.interpolateStep();
    delay(3);
  }
}

// 1-9 map to tilt
// a-z map to pan
// esc to quit

void loop() {
  if ( Serial.available() > 0 ) {
     unsigned char inByte = Serial.read();
     
      if ( inByte >= 'a' && inByte <= 'z' ) {
          int pan = inByte - 'a';

          tilt = (tilt>TILT_MAX)?TILT_MAX:tilt;
          tilt = (tilt<TILT_MIN)?TILT_MIN:tilt;
          SetPosition(TILT,tilt);
          Serial.print("tilt: ");
          Serial.println( tilt );
      }
  }
}

