Problem with relay control
Posted: Mon May 16, 2022 4:00 pm
I’m running NodeMCU 8266 with the Cloud4rpi MQTT web service. I have a Cloud4rpi switch control that when set to True switches on an external LED on GPIO12.
BUT I want this to switch a relay too, and True on GPIO12 is 0V not 3.3 (measured on a voltmeter). This means the relay switches on when the switch is set to False, and off when it’s True - so the opposite of the LED.
Any ideas how to fix this so the LED is On and the relay is powered at the same time?
BUT I want this to switch a relay too, and True on GPIO12 is 0V not 3.3 (measured on a voltmeter). This means the relay switches on when the switch is set to False, and off when it’s True - so the opposite of the LED.
Any ideas how to fix this so the LED is On and the relay is powered at the same time?