two-legged button one side is 5v and the other side is gnd. Signal is received from gnd side.