Im facing a wierd problem with arduino uno?

so, I have a engg project that takes rfid data from the module, into the Arduino and puts it over the internet making Arduino as the web server…

to do that, I underwent tutorials on my specific problem statement and typed the code… I tried to turn on and off the inbuilt led pin 13 by using internet… that didn’t workout as was shown in the tutorial… everything before the led on off part did work though.

the problem is the pin 13 on the uno stays off but the one the shield stays constantly on and that too neither fully bright nor off.

however, the inbult blink program example works perfectly fine.

could it be possible that the shield’s led is blinking extremely fast?

here is my code

#include<String.h>
#include<SPI.h>
#include<Ethernet.h>

//details obtained from cmd>ipconfig /all

byte mac[]= {0xDE,0xAD,0xBE,0xEF,0xFE,0xED};
byte ip[] = {192, 168, 0, 3}; //local ip addr
byte subnet[] = {255, 255, 255, 0}; //default subnet mask
byte gateway[] = {192, 168, 0, 1}; //default gateway
EthernetServer server(80);

String x="";
int pinled = 13;

void setup()
{
  Ethernet.begin(mac, ip, gateway, subnet);
  pinMode(pinled, OUTPUT);
  Serial.begin(9600);
  x = "";
}

void loop()
{
  EthernetClient client = server.available();
  if(client)
  {
    Serial.println("Are u requesting service?");
    while(client.connected())
    {
      if(client.available())
      {
          char c = client.read();
          x.concat(c);
          if(c=='\n')
          {
            Serial.print(x);

            if(x.indexOf("Led=1")>0)
            {
              digitalWrite(pinled, HIGH);
              Serial.println("Led is ON");
            }
            else
            {    
              digitalWrite(pinled, LOW); 
              Serial.println("Led is OFF");
            }
            x = "";
            client.println("HTTP/1.1 200 OK");
            client.println("Content-Type:text/html");
            client.println();

            client.println("<head><title>test</title></head>");
            client.println("<body><p><a href='/?Led=1'>LED ON </a></p> <p><a href='/?Led=0'> LED  off </a></p></body>");  
            client.stop();
        }       
      }
    }  
  }
}

I’m pretty new to Arduino so could you help me in a newbie friendly way :stuck_out_tongue: ?

Images from Original Post so we don’t have to download them. See Image Guide

e1fa5e94cb8bc8914ecf7a991ac53c9cc0f0d0e2.png

8ce57c593dcac03d5c9f3fa521f7ff9ace968d21.png

…R

I can't figure what the images are conveying.

I would have assumed you would have a continuous stream of "LED on" etc

Strings (capital S) can cause memory corruption in the small memory of an Arduino. You should use strings (small s). The examples in Serial Input Basics may give you some ideas.

...R

Which Arduino are you using? If it is a Uno or other 328-based Arduino, the SPI pins are 11, 12, and 13, and can NOT be used for other purposes. They are how the Arduino and the Ethernet shield communicate.

but the one the shield stays constantly on and that too neither fully bright nor off.

What one on what shield?

Thank you very much... I changed the pin number to pin 9 (other than 10,11,12,13)... It worked... Thanks a lot.