Processing code
To control the servo with a mouse, here's a simple code made with processing to do the job. You don't have to use this code, you can also send commands to the arduino board from arduino IDEs Serial monitor. (Servo position 0 to 180 are commands 0s and 180s respectively)