Arduino+easyvr+servo motor

Two things ...

Have you noticed there is a smiley in the middle of your code - not very helpful! That's because you did not read the How To Use The Forum and did not put your code in code tags. Please edit your post and correct this.

How are you powering the servo?. It should have its own power supply with a common ground with the Arduino. Servos draw too much current to be powered from the Arduino 5v connection and can cause the Arduino to reset with strange consequences - including possible loss of connection to the PC.

...R