You will find the code for Hall-effect sensors in the chapter11/hall_effect_digital.py file for switch and latching switch type Hall-effect sensors and the chapter11/hall_effect_analog.py file for ratiometric type Hall-effect sensors.
What you will find when you review these two files is the following:
- chapter11/hall_effect_digital.py is functionally identical to the PIR code example we covered previously in this chapter in the section titled Running and exploring the PIR sensor code. Both the PIR and non-latching/latching Hall-effect sensors are digital switches. The only difference is that our reference Hall-effect sensor is active LOW.
- chapter11/hall_effect_analog.py is similar to other analog-to-digital examples we have seen using the ADS1115 ACD, including the circuit wiring and code from Chapter 5, Connecting Your Raspberry Pi to the Physical World.
The varying voltage range outputted by the AH3503...