I’m trying to connect a pir sensor from adafruit to my electric imp but can’t get it to work. When measuring the data-pin when not connected to the imp the pir works fine and show 3.3 V. However, when it’s connected to the pin1 on the electric imp the voltage is only 0.8 V when there is movement. The code is really simple:
`motion <- hardware.pin1;
imp.setpowersave(false);
function motionSensorChanged()
{
local state = motion.read()
if (state == 1){
server.log(“Garage movement start”);
}
else{
server.log(“Garage movement stop”);
}
}
I have used a PIR into a digital input with no problem, though I can’t remember which pin. Does your pin1 normally work okay, or might it be an Aria with a bad pin1 connection? What voltage does the input pin show with a voltmeter when not connected to the PIR? (clearly it should be pulled up to the 3.3v rail). I suggest trying with a different pin.