 #define DATAPIN 6
 #define RESET 7
 
+// set up memory push buttons
+#define M1Sw 8
+#define M2Sw 9
+
 const double bandStart = 100000;  // start of Gnerator at 100 KHZ
 const double bandEnd = 40000000; // End of Generator at 40 MHz --signal will be a bit flaky!
 const double bandInit = 7150000; // where to initially set the frequency for tetsting Part II

  attachInterrupt(0, evaluateRotary, CHANGE);
  attachInterrupt(1, evaluateRotary, CHANGE);
  pinMode(RotEncSwPin, INPUT_PULLUP);
  
 // start up the DDS... 
  pulseHigh(RESET);

    lastBlink = millis();
  }
  
  // handle memory buttons
  if(!m1armed && !digitalRead(M1Sw) && millis() - lastM1 > 50) {
    lastM1 = millis();
    m1armed = true;
  }
  if(m1armed && digitalRead(M1Sw) && millis() - lastM1 > 50) {  
    //pushed, but for how long?
    lcd.setCursor(0,1);
    if(millis() - lastM1 > 500) {
    // long push = commit to memory
    lcd.print("m1 stored");
    } else {
    // short push = qsy to memory frequency
    lcd.print("recall m1");
    }
    m1armed = false;
    lastM1 = millis();
  }

//yes, duplicative code, could make an array of it...
//maybe optimize later

  if(!m2armed && !digitalRead(M2Sw) && millis() - lastM2 > 50) {
    lastM2 = millis();
    m2armed = true;
  }
  if(m2armed && digitalRead(M2Sw) && millis() - lastM2 > 50) {
    //pushed, but for how long?
    lcd.setCursor(0,1); 
    if(millis() - lastM2 > 500) {
    // long push = commit to memory
    lcd.print("m2 stored"); 
    } else {
    // short push = qsy to memory frequency
    lcd.print("recall m2"); 
    }
    m2armed = false;
    lastM2 = millis();
  }
}

// subroutine to display the frequency...
