Trying to control relay with Arduino Yun....(PLEASE HELP ME!)

Hi guys :slight_smile:
As I mentioned in title, I'm trying to control relay with my arduino yun(and my own webpage.)
I'm just getting everything right but my relay won't work right. :o :o
I wrote the code bellow which I'm having trouble with.

HttpClient client_2;
        client_2.get(Help);
        int c = client_2.read();
        int k = c-48;
        if (client_2.available()){
          
          Serial.println(c);          
          Serial.println(k);
          if(k==1){
            Serial.println("ON");
            digitalWrite(Relay,HIGH);
          }
          else{
            Serial.println("OFF");
            digitalWrite(Relay,HIGH);
            
          }

I first wrote the code with "char c" instead of "int c" but it did not work.
So I changed them into "int" type. In the Serial moniter, I'm getting
49
1
ON
which means the code is working great! However, my relay won't turn on....
It would be great to know the problem. Please help me!

Thats only partial code.

If you want anyone to take a better look at it then please post the WHOLE sketch along with a schematic (even hand drawn will do).

Some relays take a little more current than some boards can supply and may need an external supply but with a common ground to the Arduino.

I have a few relays and relay modules a couple of which will not work on the MKR and 101 series boards as the output is just not quite enough yet a very similar relay modules work great on everything else.

I'll second bob: post the full sketch and schematic.

It could be a wiring error, a design flaw in the way it's hooked up, or a problem in the sketch. Bob hit on a few potential electrical issues, and here's a potential problem in the sketch: did you perform a pinmode() call to set relay pin to be an output?