In my nodeMCU project, I am defining some gpios as input. I will connect them some sensors. Although I am using pulldown resistors (10K), especially D3 and the other some data pins always stay in HIGH.
I want them to stay in LOW until the sensors outputs go to HIGH. My piece of code is as follows…What is the problem? Help me please…Thanks.
void setup()
{
pinMode(16, INPUT); // define D0 as input
pinMode(5, INPUT); // define D1 as input
pinMode(4, INPUT); // define D2 as input
pinMode(0, INPUT); // define D3 as input
I have solved the problem after making some search in the internet. Some io pins are connected to High via pull up resistors, so they can not be used as high impedance input, but some others can…