Olá Pessoal,
Arduino para de pingar e trava assim que é requisitada a pagina html via browser , escrevi o programa e funcionou, com 1 2 3 e 4 botões, porem precisava de 16 botões, pra controlar 16 reles, assim que o html aumenta e passa dos 4 primeiras series de botões o programa para de funcionar, segue código:
programa parte 1:
#include <EtherCard.h>
//DANIEL DIAS SILVA - PROGRAMACAO FONTE PRACA MANOEL LEITE LEMOS - DELFINOPOLIS-MG - DANIEL.DELFINOPOLIS@GMAIL.COM
static byte mymac[] = { 0x00,0x01,0x01,0x01,0x01,0x01 };
static byte myip[] = { 192,168,2,201 };
static byte mygw[] = { 192,168,2,1 };
static byte mydns[] = { 192,168,2,1 };
#define BUFFER_SIZE 1500
byte Ethernet::buffer[BUFFER_SIZE];
BufferFiller bfill;
#define RELAIS_1 31
#define RELAIS_2 33
#define RELAIS_3 35
#define RELAIS_4 37
#define RELAIS_5 39
#define RELAIS_6 41
#define RELAIS_7 43
#define RELAIS_8 45
#define RELAIS_9 30
#define RELAIS_10 32
#define RELAIS_11 34
#define RELAIS_12 36
#define RELAIS_13 38
#define RELAIS_14 40
#define RELAIS_15 42
#define RELAIS_16 44
long randNumber;
long randNumber2;
unsigned long tempo = millis();
int temporizador = 0;
int rele01 = 0;
int rele02 = 0;
int rele03 = 0;
int rele04 = 0;
int rele05 = 0;
int rele06 = 0;
int rele07 = 0;
int rele08 = 0;
int rele09 = 0;
int rele10 = 0;
int rele11 = 0;
int rele12 = 0;
int rele13 = 0;
int rele14 = 0;
int rele15 = 0;
int rele16 = 0;
const char http_OK[] PROGMEM =
"HTTP/1.0 200 OK\r\n"
"Content-Type: text/html\r\n"
"Pragma: no-cache\r\n\r\n";
const char http_Found[] PROGMEM =
"HTTP/1.0 302 Found\r\n"
"Location: /\r\n\r\n";
const char http_Unauthorized[] PROGMEM =
"HTTP/1.0 401 Unauthorized\r\n"
"Content-Type: text/html\r\n\r\n"
"<h1>401 Unauthorized</h1>";
void homePage()
{
bfill.emit_p(PSTR("$F"
"<title>FONTE DELFINOPOLIS</title>
"
"<form method=get name=form><center>"
"BOMBA_1:<button name=relais001 value=on type=submit style=height:40px; width:150px> ON </button>"
"<button name=relais001 value=aut type=submit style=height:40px; width:150px> AUTO </button>"
"<button name=relais001 value=off type=submit style=height:40px; width:150px> OFF </button>
"
"BOMBA_2:<button name=relais002 value=on type=submit style=height:40px; width:150px> ON </button>"
"<button name=relais002 value=aut type=submit style=height:40px; width:150px> AUTO </button>"
"<button name=relais002 value=off type=submit style=height:40px; width:150px> OFF </button>
"
"BOMBA_3:<button name=relais003 value=on type=submit style=height:40px; width:150px> ON </button>"
"<button name=relais003 value=aut type=submit style=height:40px; width:150px> AUTO </button>"
"<button name=relais003 value=off type=submit style=height:40px; width:150px> OFF </button>
"
"BOMBA_4:<button name=relais004 value=on type=submit style=height:40px; width:150px> ON </button>"
"<button name=relais004 value=aut type=submit style=height:40px; width:150px> AUTO </button>"
"<button name=relais004 value=off type=submit style=height:40px; width:150px> OFF </button>
"
// "BOMBA_5:<button name=relais005 value=on type=submit style=height:40px; width:150px> ON </button>"
// "<button name=relais005 value=aut type=submit style=height:40px; width:150px> AUTO </button>"
// "<button name=relais005 value=off type=submit style=height:40px; width:150px> OFF </button>
"
// "BOMBA_6:<button name=relais006 value=on type=submit style=height:40px; width:150px> ON </button>"
// "<button name=relais006 value=aut type=submit style=height:40px; width:150px> AUTO </button>"
// "<button name=relais006 value=off type=submit style=height:40px; width:150px> OFF </button>
"
// "BOMBA_7:<button name=relais007 value=on type=submit style=height:40px; width:150px> ON </button>"
// "<button name=relais007 value=aut type=submit style=height:40px; width:150px> AUTO </button>"
// "<button name=relais007 value=off type=submit style=height:40px; width:150px> OFF </button>
"
// "LUZ_01:<button name=relais008 value=on type=submit style=height:40px; width:150px> ON </button>"
// "<button name=relais008 value=aut type=submit style=height:40px; width:150px> AUTO </button>"
// "<button name=relais008 value=off type=submit style=height:40px; width:150px> OFF </button>
"
),
http_OK );
}