After spending a lot of time working with the Raspberry Pi in its various guises, I got hold of a copy of Getting Started with Arduino. Working through that, I hit this page. My local electronics supplier didn't have the IRF520 MOSFET, but they did have the IRF540. Borrowing a 520 from a friend and adding in a 1k resistor to stop the PWM pin floating allowed me to get the circuit to work. Putting in the IRF540 causes the motor to run away completely. The FET also gets really warm. My guess is that there's not enough internal resistance in the IRF540 FET (0.27ohm in the 520 versus 0.07ohm in the 540) to keep the motor from running away and it needs a second resistor. Where would I put that second resistor in? I'm thinking between the Vin line and the source pin on the MOSFET. Does that sound right? If so, what value would be good?