-#include <avr/pgmspace.h>
+#include <EEPROM.h>
 
 #define MAX_VOLUME 0
 #define MIN_VOLUME 0


bool menuStatus; // this bool stores the menu toggle status 1 stands for Volume and 0 for Sensitivity

unsigned int volume;
unsigned int sensitivity;


void setup() {
  pinMode(increasePin, INPUT_PULLUP);
  pinMode(decreasePin, INPUT_PULLUP);
  pinMode(menuPin, INPUT_PULLUP);
  attachInterrupt(digitalPinToInterrupt(increasePin), increase, FALLING);  //when an interruption occurs on falling edge (it's pulled up) system calls increase
  attachInterrupt(digitalPinToInterrupt(increasePin), decrease, FALLING);  //when an interruption occurs on falling edge (it's pulled up) system calls decrease
  attachInterrupt(digitalPinToInterrupt(increasePin), toggleMenu, FALLING);  //when an interruption occurs on falling edge (it's pulled up) system calls toggleMenu


}

void increase()
{
  if( menuStatus)
    {
      if(volume.value < MAX_VOLUME) 
      { volume.value++;
        EEPROM.write(volume.address,volume.value);
      }
    }
   else{
        if(sensitivity.value < MAX_SENSITIVITY) 
          {
            sensitivity.value++;
            EEPROM.write(sensitivity.address,sensitivity.value);
          }
   
   }
}

void decrease(){
  if( menuStatus)
    {
      if(volume.value > MIN_VOLUME) volume.value--;
    }
   else{
      if(sensitivity.value>MIN_SENSITIVITY) sensitivity.value--;
   }
}

