I did try that but still no progress.
Man this is quite the struggle.
maybe you should first go back to the basics and simply attach a LED to the port and see if it lights up when you set it high. Preferably let it blink so you know for sure it works and both HIGH/LOW are good
edit: Marvin was so kind to work the above suggestion out for you in detail
Ok, I do have one hint for you (to identify correct pin):
Flash the simplest code to the board:
#define DHTPIN 4 //or any other CORRECT GPIO
void setup() {
pinMode(DHTPIN, OUTPUT); // Initialize the LED_BUILTIN pin as an output
}
// the loop function runs over and over again forever
void loop() {
digitalWrite(DHTPIN, LOW); // Turn the LED on (Note that LOW is the voltage level
// but actually the LED is on; this is because
// it is active low on the ESP-01)
delay(1000); // Wait for a second
digitalWrite(DHTPIN, HIGH); // Turn the LED off by making the voltage HIGH
delay(1000); // Wait for two seconds (to demonstrate the active low LED)
}
NOW! Get the multimeter, or a LED (any but NOT BLUE or WHITE) with 1k - 2k2 resistor IN SERIES, check the polarity and connect the cathode to GND, while the other end to output pins, one by one.
The correct one will flash with 50% duty cycle at 1 Hz.
You didn’t answered this question. You have chosen generic board - OK, but this might have different pin assignment than your specific board.
EDIT: @wolph42 suggested more or less the same, while I typed this So we both suggest you : check your board and/or connections
Hello,
Successfully, I have resolved the issue. One thing to note is pin number on arduino is same as pin number on esp8266 thing dev board. I did try the same thing before but it failed to work earlier. But when I reset the board while code was running and plugged in the data wire in pin 4, it began to give me the values.