I’m still pretty new with electronics and arduinos but I’ve got my project half working so far. I have a relay board with 2 relays ( SRD05VDC-SL-C ) and I’ve been able to get the relays to turn on and off through code. The board shows a red LED light up when the switch is on and I can hear the mechanical noise of the gate opening and closing. I’ve got a 40watt 120v ikea light that I’ve been trying to light up with it.
I’m not sure what I’m doing, so please let me know if I’m about to burn the house down
I’ve attached an image of the wiring on the relay and what posts it’s connected to. If anyone can offer any help that would be excellent!
I’m not sure what I’m doing,
Then you should not be playing with mains electricity.
I’ve attached an image of the wiring on the relay and what posts it’s connected to.
That is the bit that makes the relay click, if you can hear that then that bit is working, it is the two black wires that are wrong but you make no mention as to what they are connected to.
Looking at what you posted, it looks like you don't have anything plugged into the wall outlet. The zip cord looks like it is still joined.
As Grumpy_Mike states, if you are this concerned, you should learn some things about electricity first. Playing with mains voltage can be dangerous.
You need to cut only one of the two wires to the lamp. You split the one wire and put the two contacts for the relay on that wire.
Search the web for an introduction to electricity and home electrical repairs.