 long lastBlink = 0;
 boolean blinkState = false;
 
-boolean m1armed = false;
-boolean m2armed = false;
-long lastM1 = 0;
-long lastM2 = 0;
+boolean mem_armed[NUMBER_MEM_BUTTONS];
+long last_mem[NUMBER_MEM_BUTTONS];
 
 int eeAddressStart = 0;
 

  pinMode(RotEncSwPin, INPUT_PULLUP);
  
  // Set up memory buttons
  pinMode(M1Sw, INPUT_PULLUP);
  pinMode(M2Sw, INPUT_PULLUP);
  
  
 // start on M1 freq
  EEPROM.get(eeAddressStart,freq);
  if(freq < bandStart || freq > bandEnd) {

#define RESET 7

// set up memory push buttons
#define MEM_BUTTON_START_PIN  8  // digital pin where mem buttons start
#define NUMBER_MEM_BUTTONS    2  // how many mem buttons

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!
