i have a nodeMCU v3(esp8266) and what i want is: when i send DC 5v or 3v to a pin=D1 (idk if its possible to send 5v directly to pin) then to activate the D0 for 20Seconds
like this:
if (D1==Sends signal){
digitalWrite(pinD0, HIGH);
delay(20000); //pinD0 is active for 20 seconds
}else{
digitalWrite(pinD0, LOW);
}