The number in your code is the D number on the controller PCB.
5 == D5.
TRY IT?
Use the 5V and gnd pins from the controller PCB to power the relay board.
Can you please post a copy of your circuit, a picture of a hand drawn circuit in jpg, png?
Hand drawn and photographed is perfectly acceptable.
Please include ALL hardware, power supplies, component names and pin labels.