Hi
I have a arduino nano with ENC28J60 shield. I use this to control an RGBW led strip with E1.31 commands, The library used is Ethercard.
I would like to have the flexibility to change parameters like offset channel and universe, but I dont know how I can get the HTML input to work. As far as I understand, a form requires a script to handle the values used on the input. This is the HTML i have now:
static word homePage() {
long t = millis() / 1000;
word h = t / 3600;
byte m = (t / 60) % 60;
byte s = t % 60;
bfill = ether.tcpOffset();
bfill.emit_p(PSTR(
"HTTP/1.0 200 OK\r\n"
"Content-Type: text/html\r\n"
"Pragma: no-cache\r\n"
"\r\n"
"<meta http-equiv='content-type' content='text/html; charset=UTF-8'/>"
"<title>RBBB server</title>"
"<h1>12V RGBW Controller 80</h1>"
"<h3>sACN universe: <input type=number id=sACNuniverse name=sACNuniverse min=1 max=63999 value=$D$></h3>"
"<h3>Channel offset: <input type=number id=channelOffset name=channelOffset min=0 max=509 value=$D$></h3>"
"<input type=submit value=UPDATE>"
),DMX_UNIVERSE, CHANNEL_OFFSET);
return bfill.position();
}
How can I link the inputs to my running variables? Any alternatives? Thanks!
Touch here for the full post on the Arduino Apprentices tumblr