     analogWrite(9, 64); // 488Hz 0.512ms pulse, 2.05ms period
     analogWrite(5, 64); // 976Hz 0.255ms pulse, 1.02ms period
 #endif
+
+    /*
+     * Enable ADC mode button
+     */
+    pinMode(MODE_BUTTON_PIN, INPUT);
+    digitalWrite(MODE_BUTTON_PIN, HIGH);
+}
+
+/*
+ * Cycle through the ADC modes with each button push.
+ */
+void setADCMode(){
+    enum {
+        BUTTON_ON, 
+        BUTTON_OFF
+    };
+    static int modeButtonState = BUTTON_OFF;
+    static int adcMode = ADC_MODE;
+
+    if (!digitalRead(MODE_BUTTON_PIN)){
+        if (modeButtonState == BUTTON_OFF){
+            modeButtonState = BUTTON_ON;
+            adcMode = (adcMode+1) % capture.adc.getModeCount();
+            capture.adc.setMode(adcMode);
+        }
+    } else {
+        modeButtonState = BUTTON_OFF;
+    }
 }
 
 void loop(){

    display.print(F("Sample Rate "));
    display.printLargeUnits(capture.adc.getSampleRate(), "Hz\n");
    display.display();
    delay(4000);
}

void setup(){

    }
    display.display();

    setADCMode();
    // displaying at max 20fps
    delay(50);
}
