adafruit_support_mike wrote:Glad to hear you have it working. Happy hacking!
adafruit_support_mike wrote:Hmm.. let's test a couple of things:
Connect the sensor's VCC and GND pins to the RasPi, but disconnect the jumper between the sensor's OUT pin and the RasPi. Repeat the same sequence you've already done, testing it without the code running, then running the code.
With no connection to the RasPi, you'd think the sensor will continue to behave normally, but let's verify that.
At the same time, let's see what that GPIO pin is doing. Make a voltage divider between the RasPi's 3.3v pin and GND with a couple of 10k resistors, then connect the GPIO pin to the center of that divider. Without the GPIO pin connected, the voltage at the center of the divider should be 1.65v. Check that during the part of your test before you run the code, then check again after you start running the code. If there's an internal pull-up or pull-down resistor connected, you should see some change in the voltage at the center of the divider. If you have 100k resistors, those will make the change even more visible.
it it goes to the failure mode - generally always high but occasional drops to 0v.
Users browsing this forum: No registered users and 1 guest