Error in my code help

Place Serial prints at strategic locations to make sure you values are what you think they should be.

Hum, Serial.print(String("Velocitat: ")); this is odd, why not Serial.print("Velocitat: "); or Serial.print("Velocitat: \n"); ?

BTW delay() suspends all program execution for that amount of time, not recommended.