 #include <Adafruit_GFX.h>
 #endif
 #include <Arduino.h>
+#include <EEPROM.h>
 #include "adc.h"
 #include "scope.h"
 #include "capture.h"

 * End Configurable parameters
 ****************************************************************************/


extern Display display;
static Capture capture;

        BUTTON_ON, 
        BUTTON_OFF
    };
    static uint8_t modeButtonState = BUTTON_OFF;
    int adcMode = EEPROM.read(ADC_MODE_ADDR);
    
    if (digitalRead(MODE_BUTTON_PIN) == LOW){
        if (modeButtonState == BUTTON_OFF){
            modeButtonState = BUTTON_ON;
            adcMode = (adcMode+1) % capture.adc.getModeCount();
            capture.adc.setMode(adcMode);
            EEPROM.write(ADC_MODE_ADDR, byte(adcMode));
        }
    } else {
        modeButtonState = BUTTON_OFF;
