KY-024 Linear Magnetic Hall Sensor Module is an analog/digital module with a built-in potentiometer to adjust the sensitivity of the sensor. Analog output (AO) works in the same way as on the KY – 003. Digital output (DO) allows for a pure HIGH/LOW detection and adjusting the sensitivity of that detection with a potentiometer.
In both cases the GND(-) connects to any ground pin (black) on a Raspberry Pi, VCC(+) power supply (red) connects to the 3.3V on RPI and the signal (S or AO/DO) is linked to any GPIO pin (blue).
When using Hall sensor modules have to be mounted in a correct orientation. One side will respond to the N pole of the sensor while the other side will respond to the S pole.