-
• #2
Have you also connected Ground on the sensor to ground on Puck.js? If you haven't, doing so would help a lot.
Also, it depends on your sensor, but you might need a pull-down resistor. You can turn Espruino's built-in ones on just by adding
pinMode(D1,"input_pulldown")
-
• #3
Hey. Thanks. I didn't know about the built-in pull-down resistors. I've given that a go.
I found this page with a load of information.
It says "the device requires nearly a minute to initialize". So that may have been part of the problem.
I think it's working now. Thanks.
Hi. I'm trying to read from a PIR sensor. I'm aware that the sensor requires 5V, so I'm using a separate power supply for now. The problem is that as soon as I switch connect the power, the signal constantly detected by the pin. Even if I just touch a screwdriver to the pin, instead of using the sensor, a signal is detected.
Am I doing something wrong?
Thanks.