Greetings,
I was wondering if it is possible to wire two Hall sensors on a single Arduino digital or analog input.
Rationale: I have two Hall sensors A3144 (very close one to each other) on a pad, to detect the presence of a magnet;
the activation of at least one sensor is enough for me to state that the magnet is close to the pad.
I would like to use only one Arduino input. Is it possible to arrange the two sensors in an hardware configuration to produce a logic 'OR'?
In this link the configuration I would like to have (I did not tried it).
Since the A3144 is an open collector switch you can do the "wired OR" with them. I set up my Uno with 2 A3144 switches and the following code to test. I get a LOW when either sensor is in the magnetic field (of the proper polarity) and a HIGH when the magnet is away. Circuit is wired like your fritzing diagram except I use digital pin 4 (A3144 is a switch, a digital function) and 10K pullup resistors.