Please can someone help me.
I am new in arduino programming, I have problem with switching relay on and off.
Everything works great except when I set pinout to HIGH it turns OFF the relay and when I set pinout to LOW it turns ON the relay.
Can someone help me to resolve that problem.
This is the relay that I bought.
Hmmm, ok if that is the way how relays work.
I am sending this over MQTT so then I can just send 0 to power on the relay, but somehow this is wrong in my head
icanic:
Please can someone help me.
I am new in arduino programming, I have problem with switching relay on and off.
Everything works great except when I set pinout to HIGH it turns OFF the relay and when I set pinout to LOW it turns ON the relay.
Can someone help me to resolve that problem.
This is the relay that I bought.
And if you ever replace that relay with another, not identical or from the same manufacturer, you will find it works the other way around. I have had to change program when replacing relay modules.
---------------------( COPY )---------------------
IMPORTANT NOTE: There is a issue with start-up of Arduino programs that control these relays. All of these 2,4, or 8 relay boards input controls are Active LOW, meaning that setting a pin LOW turns them ON. To assure that no relays activate at Reset or Power-On until you want them to, the initialization sequence in SETUP should be:
digitalWrite(Relay, HIGH);
pinMode(Relay, OUTPUT);
This design is intentional, so that it is possible to guarantee that at power-on of a system, or system reset, that no relays activate except when expected under program control. There may be pumps, lights etc attached and chaos could ensue if this was not controlled definitively for each output port being used.
-----------------( END COPY )----------------------