Hey, this is just a quick question.
On another post, I was having trouble with a mosfet and a motor and I mentioned the fact that I just had the output line hooked directly to the mosfet. Someone recommended having a 100-ohm resistor in series with the gate. What is the purpose of that? Is it just to protect the arduino in case you connect the wire into the wrong hole on the breadboard (e.g. the drain of the mosfet instead of the gate?) I had one of those "inductive spike suppressing" diodes. I thought that the fact that the gate is isolated and controlled by voltage instead of current was the advantage of a mosfet over a regular transistor.
The main purpose of a series gate resistor on a mosfet is to limit the current peaks the arduino output pin has to supply to the gate. A mosfet gate acts like a capacitor as seen from the arduino output pin, in that it only draws current to charge (to turn on) or dischage (to turn off) the gate capacitance. After charging/discharging to full on or off, there is no current flowing from or to the output pin as the gate is insulated from the drain and source of the mosfet, but there is real current flowing during the switching transitions of off to on and on to off.