Servo write - variable

That should write 180 position to servo pin 8.

Pin 10, I think.

Edit: you don't have a servo 8, only 0 to 7, on pins 2 to 9