Arduino with N channel mosfet and PNP transistor

Mind, not all MOSFETs can handle 24V on the gate.