I think that the schematic is incorrect for a N-channel mosfet.
LED (plus resistor) between drain and 3.3V or 5V; source to ground. Gate via resistor to Arduino. You can replace the motor in https://www.gammon.com.au/motors by led plus resistor and omit D1.