Hello. I want to control 22 relays from an embed webpage with an arduino mega2560. but they told me the code is too large for send to html. that i have to send by packages.. so. what i can do?
With a certain piece of code the web page loads, if I add more lines it does not load more
static word mainPage()
{
BufferFiller bfill = ether.tcpOffset();
bfill.emit_p(PSTR("HTTP/1.0 200 OK\r\n"
"Content-Type: text/html\r\nPragma: no-cache\r\n\r\n"
"<html><head><title>Control Web</title></head>"
"<body>"
"<div style='text-align:center;'>"
"<h1>Control room</h1>"
"
"
"<h2>Control of doors</h2>"
"Door 1 = $S
"
"<a href='./?data1=0'><input type='button' value='UP'></a>"
"<a href='./?data1=1'><input type='button' value='STOP'></a>"
"<a href='./?data1=2'><input type='button' value='DOWN'></a>"
"
Door 2 = $S
"
"<a href='./?data2=0'><input type='button' value='UP'></a>"
"<a href='./?data2=1'><input type='button' value='STOP'></a>"
"<a href='./?data2=2'><input type='button' value='DOWN'></a>"
"
Door 3 = $S
"
"<a href='./?data3=0'><input type='button' value='UP'></a>"
"<a href='./?data3=1'><input type='button' value='STOP'></a>"
"<a href='./?data3=2'><input type='button' value='DOWN'></a>"
"
Door 5 = $S
"
"<a href='./?data4=0'><input type='button' value='UP'></a>"
"<a href='./?data4=1'><input type='button' value='STOP'></a>"
"<a href='./?data4=2'><input type='button' value='DOWN'></a>"
"<h2>Control lights</h2>"
"Plafon 1 = $S
"
"<a href='./?data5=0'><input type='button' value='OFF'></a>"
"<a href='./?data5=1'><input type='button' value='ON'></a>"
"
Plafon 2 = $S
"
"<a href='./?data6=0'><input type='button' value='OFF'></a>"
"<a href='./?data6=1'><input type='button' value='ON'></a>"
"
Plafon 3 = $S
"
"<a href='./?data7=0'><input type='button' value='OFF'></a>"
"<a href='./?data7=1'><input type='button' value='ON'></a>"
"
Plafon 4 = $S
"
"<a href='./?data8=0'><input type='button' value='OFF'></a>"
"<a href='./?data8=1'><input type='button' value='ON'></a>"
"
Plafon 5 = $S
"
"<a href='./?data9=0'><input type='button' value='OFF'></a>"
"<a href='./?data9=1'><input type='button' value='ON'></a>"
"
Plafon 6 = $S
"
"<a href='./?data10=0'><input type='button' value='OFF'></a>"
"<a href='./?data10=1'><input type='button' value='ON'></a>"
"<h2>Control bulb</h2>"
"
light ext = $S
"
"<a href='./?data11=0'><input type='button' value='OFF'></a>"
"<a href='./?data11=1'><input type='button' value='ON'></a>"
"<h2>Control bulb int</h2>"
"
bulb = $S
"
"<a href='./?data12=0'><input type='button' value='OFF'></a>"
"<a href='./?data12=1'><input type='button' value='ON'></a>"
"<h2>Control Siren</h2>"
"
Inter = $S
"
"<a href='./?data13=0'><input type='button' value='OFF'></a>"
"<a href='./?data13=1'><input type='button' value='ON'></a>"
"
Siren = $S
"
"<a href='./?data14=0'><input type='button' value='OFF'></a>"
"<a href='./?data14=1'><input type='button' value='ON'></a>"
"
</div>\n</body></html>"),*/
/*
statedoor1,
statedoor2,
statedoor3,
statedoor5,
statelight1,
statelight2,
statelight3,
statelight4,
statelight5,
statelight6,
statebulb,
statebulbext,
statebulbint,
statesiren);
return bfill.position();
}