Hello everyone!
This is my first post. and besides, I'm Polish and my english is not the best.
I am interested in Arduino, I bury it and program it.
Projects so far very simple. But I would like to have my Arduino eyes out. smiley
I bought ENC28J60 Ethernet module.
I plugged the library added to it.
And, unfortunately, does not work ... Maybe some hints as to embrace?
I have this code but I do not know why it does not: (
#include <EtherCard.h>
#include "etherShield.h"
#include <ETHER_28J60.h>static byte mymac[] = { 0x74,0x69,0x69,0x2D,0x30,0x31 };
static byte myip[] = { 192,168,0,105 };
static byte myport = { 80 };
int i = 0;BufferFiller bfill;
#define LED 4 // define LED pin
bool ledStatus = false;
ETHER_28J60 e;void setup()
{
pinMode(LED, OUTPUT);
digitalWrite(LED, LOW);delay(1000);
e.setup(mymac, myip, myport);
}void loop()
{
char* params;if (params = e.serviceRequest())
{
if (strcmp(params, "lampka") == 0)
{
if(i == 0) {
digitalWrite(LED, HIGH);
i=1;
} else if(i == 1) {
digitalWrite(LED, LOW);
i=0;
}
e.print("Done!");
} else if (strcmp(params, "lampka_off") == 0) {
digitalWrite(LED, LOW);
i=0;
e.print("OFF-DONE!");
} else if (strcmp(params, "lampka_on") == 0) {
digitalWrite(LED, HIGH);
i=1;
e.print("ON-DONE!");
} else if (strcmp(params, "lampka_status") == 0) {
e.print(i);
} else {
e.print("Hello, World! smiley-razz");
}
e.respond();
}
}
and when I entered my address WAN and command into the browser, nothing happens: (
Ports on the routher have made ??....
Please HELP