The code uploaded successfuly but it doesn't work

Hoping to help.

Apply the IDE Auto Format tool to your sketch.

Use the IDE Copy for Forum tool, and paste the sketch here.

So it looks like code

void setup() {
   Serial.begin(115200);
}

a7