How have you wired those sensors up?
I can't see a pull up resistor anywhere. If you haven't got one then your inputs are floating and all bets are off as to what they return.
See this by printing the sensor readings to the serial monitor.
How have you wired those sensors up?
I can't see a pull up resistor anywhere. If you haven't got one then your inputs are floating and all bets are off as to what they return.
See this by printing the sensor readings to the serial monitor.