Nodemcu and PIR Sensor False Triggering
Posted: Fri Feb 23, 2018 11:52 pm
Hi everyone!
I am trying to connect a PIR sensor to my Nodemcu board. However, the serial monitor only displays ones. I have literally tried everything, also level converters to go from the 3.3v of the board to the 5v of the sensor. Nothing, still always ones.
here is the code:
void setup()
{Serial.begin(9600);
pinMode(5, INPUT);
}
void loop()
{
Serial.println(digitalRead(5));
delay(1000);
}
Do you have any suggestions?
Thank you a lot
I am trying to connect a PIR sensor to my Nodemcu board. However, the serial monitor only displays ones. I have literally tried everything, also level converters to go from the 3.3v of the board to the 5v of the sensor. Nothing, still always ones.
here is the code:
void setup()
{Serial.begin(9600);
pinMode(5, INPUT);
}
void loop()
{
Serial.println(digitalRead(5));
delay(1000);
}
Do you have any suggestions?
Thank you a lot