Reading and Programing an Angel encoder

Based on PDF you included, it looks like sensor grounds the output pin when magnet is present. If magnet is not present, the pin floats and needs a pull-up resistor. This is great for things like confirming windows and doors are closed, but not going to help determine the angle of your shaft. The best it can do is help you count rotations (or determine when the shaft is at “home” position).