Relay is not working when supplied 5V

Hi, @rahimpuji
Welcome to the forum.

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.

Do you have a DMM? Digital MultiMeter?

Thanks.. Tom... :grinning: :+1: :coffee: :australia: :australia: