Which Arduino do you have? There may be no port D.
Edit: NodeMCU is not an Arduino, so Arduino direct port access macros cannot be used.
Which Arduino do you have? There may be no port D.
Edit: NodeMCU is not an Arduino, so Arduino direct port access macros cannot be used.