user48108: I'm using NodeMCU with 5v relay module. my problem is that when the output of NodeMCU is high the relay is off.
Which means that the relay module work in an inverted way so how can I treat this issue while when the output is high the relay become on?

user48100: try changing the connection in relay module

u can see that there are three pins in a relay. when you connect the output from the NodeMCU between the common and the NC(normally closed) pin of relay,  makes the switch close and current flows (when the relay is not powered.) try connecting the output in between common and NO(normally opened). when you connect your output between common and NO the current will only flow when the relay is powered up.

48108: <p>I'm using NodeMCU with 5v relay module. my problem is that when the output of NodeMCU is high the relay is off.
Which means that the relay module work in an inverted way so how can I treat this issue while when the output is high the relay become on?</p>
 48100: <p>try changing the connection in relay module<a href="https://i.stack.imgur.com/iaMwH.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/iaMwH.png" alt="enter image description here"></a></p>

<p><a href="https://i.stack.imgur.com/RLdzi.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RLdzi.png" alt="enter image description here"></a></p>

<p>u can see that there are three pins in a relay. when you connect the output from the NodeMCU between the common and the NC(normally closed) pin of relay,  makes the switch close and current flows (when the relay is not powered.) try connecting the output in between common and NO(normally opened). when you connect your output between common and NO the current will only flow when the relay is powered up.</p>
