Salve a tutti,setup Servo motor Parallax 360° + Arduino uno r4 wifi + due bottoni da dashboard, non riesco a far ruotare il servo orario e antiorario

#include <Servo.h>
#include <Arduino_LED_Matrix.h>
#include "closed_animation_sliding.h"

ArduinoLEDMatrix matrix;  

Servo myServo;

const int SwitchPin = 8;
byte butLst;
int  butCnt;

void setup ()
{
    Serial.begin (9600);
    pinMode (SwitchPin, INPUT_PULLUP);
    butLst = digitalRead (SwitchPin);
    myServo.attach (9);
    matrix.begin(); 
}
void showFrame() {
    static uint32_t timeRef = millis();
    static uint16_t interval = 0; // intervallo di tempo tra un frame e il successivo
    static uint8_t frameIdx = 0; // indice del frame 0÷45
    if (millis() - timeRef >= interval) {
        interval = 300;   // adesso vale 300
        timeRef = millis();
        // esegue il 45 esimo frame e dopo frameIdx vale 46
        matrix.loadFrame(closed_animation_sliding[frameIdx++]);
        // riporta frameIdx a 0
        frameIdx = frameIdx % 46;
    }
}

void loop ()
{

    byte but = digitalRead (SwitchPin);
    if (butLst != but)  {   // change
        butLst = but;
        delay (20);         // debounce

        if (LOW == but)  {  // press
            butCnt++;
            Serial.println (butCnt);
            if (butCnt % 2)
                myServo.write (180);     // odd
                showFrame();

    }        else
                myServo.write (0);      // even
        }
    }

}

'''



C:\Users\massi\Documents\Arduino\sketch_apr26efunziona_copy_20250428160845\sketch_apr26efunziona_copy_20250428160845.ino:54:1: error: expected declaration before '}' token
 }
 ^
Più di una libreria trovata per "Servo.h"
  Usata: C:\Users\massi\Documents\Arduino\libraries\Servo
  Non usata: C:\Users\massi\AppData\Local\Arduino15\libraries\Servo
exit status 1

Compilation error: expected declaration before '}' token

ho provato il merge, mi dà questo errore nella compilazione, non riesco a decifrarlo ;