This is my first time using a relay, I'm using it with a RP4, it's a low active 5v Relay to turn on a led light, the relay VCC pin is connected to the 3.3V PIN number 1 on the raspberry, the relay IN data pin is connected to pin 10 (GPIO 15) on the raspberry, and relay ground to the pin 9 ground on the raspberry, if I run the command from the terminal it works fine, note since it's low active I have to use low for turning it on and high to turn it off:
command to turn it onand to turn it offThe problem is that if I set this same code to run programmatically on boot and on shutdown, it doesn't work, I'm assuming it's something to do with the volts being weird on the GPIO pins of the raspberry on boot, does anyone have any idea what might be happening and how to fix it? thanks
![Image]()
command to turn it on
Code:
GPIO.output(15, GPIO.LOW)
Code:
GPIO.output(15, GPIO.HIGH)
Statistics: Posted by danilux — Sat Mar 23, 2024 3:42 am