I have a Arduino UNO with a Ethernet shield which hosts a basic HTML page with a button on it which controls a Relay module.
I'm trying to connect to a computer's power button so I can turn it on remotely.
I have found out that the relay basically does the opposite to the digital pin's output
Normally open Relay
HIGH = Open
LOW = Closed
I connected it through a NOT Gate made using a NPN transistor and it works perfectly how I wanted it.
Now to the question... Is there a way to write the code to make the digital pin = HIGH straight away and fast enough to not allow the relay to close the circuit and accidentally turn the computer on/off when the Arduino restarts, so I don't have to use a NOT Gate.