Hall sensor, which can detect the strength and polarity of the magnetic field. Can be used as a magnetic detection switch.