Maybe is also necessary a little delay between the digitalWrite and the digitlaRead, something like this:
digitalWrite(39, HIGH);
delay(1);
Serial.println(digitalRead(39));
delay(100);
Maybe is also necessary a little delay between the digitalWrite and the digitlaRead, something like this:
digitalWrite(39, HIGH);
delay(1);
Serial.println(digitalRead(39));
delay(100);