Thanks all of you,
Indeed there is nothing wrong with my code. The problem is indeed in the pull-down resistors, I rebuild the connection on a breadboard and works perfectly. I will have to check my PCB that contains all relays and resistors, the problem has to be on that board, bad connection or something like that.
However I would like to state that on ...
NodeMCU and "Wemos D1 R2 and Mini" esp8266 pins and io overview
RX io3 RX0
TX io1 TX0
boot config pins with pullup or pulldown on board
D3 io0 PULLUP (LOW for boot to flashing mode)
D4 io2 TX1 PULLUP (Serial1 TX. no RX for Serial1)
D8 io15 PULLDOWN (SS pin if esp8266 is SPI slave); TX if Serial.swap()
untroubled GPIOs with optional function ...
In the end, stimulated by Majenko's advice to desolder the LED, I instead carefully studied the PCB layout online, checked that it corresponded to my PCB, checked the location of nearby traces I didn't want to cut and then used multiple magnifying glasses and a fresh blade in my smallest utility knife and carefully cut the track leading from the LED to the ...
All Teensies support digitalWriteFast out of the box. digitalWriteFast compiles to just setting the bit in the right port register. You can not do that faster by direct register manipulation.
However, if for some reason you do want to manipulate the registers directly here the pin/gpio relation for the T4. (Generated by the sketch described here: https://...
Shorting the output pins together is a bad idea that will likely result in damage to your Arduino. According to specifications, the I/O pins are able to source (provide current to a load) or sink (accept current from an external source) up to 40mA. In almost all cases, you will want to use a current-limiting resistor. In some cases, an external circuit that ...
That's out of spec for any arduino microcontroller.
The behavior of a broken Arduino is "undefined" :)
I guess there will not flow current (after an initial peak), but at least one of the two pins is not working properly any more. But, this is just a guess.
And it's probably not dangerous for you or the connecting wire (Other than @jsotola's comparison ...
Yes. It is dangerous. You can imagine what would happen when you understand how a GPIO pin works in output mode.
You are effectively connecting VCC to GND via two small and weak MOSFETs which will overheat and break down.