         keySent = true;
 
         if (key == MEDIA_PLAY_PAUSE) {
+            display.clearDisplay();
             display.setCursor(10, 10);
             display.println("PLAY/PAUSE");
             display.display();
         }
         else if (key == MEDIA_VOLUME_UP) {
+            display.clearDisplay();
             display.setCursor(10, 10);
             display.println("VOLUME UP");
             display.display();
         }
         else if (key == MEDIA_VOLUME_DOWN) {
+            display.clearDisplay();
             display.setCursor(10, 10);
             display.println("VOLUME DOWN");
             display.display();

    display.display();

    delay(2000);
}


void loop() {

    // Clear the buffer.
    display.clearDisplay();
    display.display();

    if (!keySent) {

// Debounce parameters (expressed in ms)
unsigned long lastDebounceTime = 0;     /**< @brief The last time rotary encoder switch button was toggled */
unsigned long debounceDelay = 250;      /**< @brief The debounce time */

bool isMediaPlayerDetected = false;     /**< @brief Tells if a media player hase been detected or not */

// Forward declarations
void doEncoder_Expanded();
