Newbie Help - IO act like a button

Some light reading for you: N-Channel MOSFET