   
   Serial.println("Servo RecordPlay");
   
-  // need to do calibration
-  //m1Servo.attach(servoM1Pin);
-  //calibrate(m1Servo, feedbackM1Pin, 20, 160);  // calibrate for the 20-160 degree range
-  //m1Servo.detach();
+  // need to do manual calibration
 }
 
 // main loop
 void loop() {
+  
+  //Serial.println(analogRead(A5));
+  //delay(10);
   
    // record new sequence
    if (! digitalRead(recordButtonPin)) {

  Serial.println("Playing");

  m1Servo.attach(servoPinM1);
  while (digitalRead(playButtonPin)) {    
    uint8_t x = EEPROM.read(addr);
    if ((addr % 3) == 0){
      Serial.print("Read M1: "); Serial.print(x);
      if (x == 255) break;
      // map to 0-180 degrees
      x = map(x, 0, 254, 0, 180);
      Serial.print(" -> "); Serial.println(x);
      m1Servo.write(x);
    }
    delay(SAMPLE_DELAY);
    

  //       make a buffer where it can be loaded dynamically from host computer (Raspi)
}


