PID library with mosfet

I'm trying to use the PID library for controlling a resistance heater (12V) with an Arduino and TTL mosfet. I have a question: the PID gives an output between 0 and 255, but I think the mosfet needs a control of all or nothing. Should I use the example for the relay? Thank you.

PWM is what you need. Take a look at analogWrite.

Thanks, @wildbill