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
?

