Hi,
I'm working on a project where I am controlling a 5v active-low relay via a 74HC95 shift register, controlled via the GPIO pins of the Raspberry Pi. Everything is working perfectly, however, when the Raspberry Pi powers up, the state of GPIO can be unpredictable and is causing my relay (and subsequent attached periphery) to activate when it should not.
Question: Is there a way to (programatically) control the state of the GPIO pins as soon as the device is powered on? I was thinking of created a script and updating the rc.local to set the state. But I am not sure if this will be activated quickly enough. Also considering using NPN transistors to control the 5V power to the relay, controlled by a GPIO as the Base; but not sure which one to use, or which pin(s) are guaranteed low on startup.
Thanks,