Relay not working with Particle photon

@nilesh please be very careful if you are a beginner working with AC or mains electricity. As @BulldogLowell mentioned, if you have a transistor you can use a digital pin like D6 or D7 to activate it and pass a 5V signal from V_USB to the relay.

Another relevant thread for you: