#include <Wire.h>
#include <SPI.h>
#include <Ethernet.h>
byte mac[] = {0XE0, 0XDC, 0XA0, 0X19, 0XFC, 0X67 };
byte ip[] = {192, 168, 32, 199 };
byte gateway[] = {192, 168, 32, 1 };
byte subnet[] = { 255, 255, 255, 0 };
EthernetServer server(80);
void setup()
{
Serial.begin(9600);
Wire.begin();
Ethernet.begin(mac, ip);
server.begin();
}
void loop()
{
EthernetClient client = server.available();
if (client) {
while (client.connected()) {
if (client.available()) {
client.print("HTTP/1.0 200 OK\r\nServer: arduino\r\nContent-Type: text/html\r\n\r\n");
client.print("<HTML><HEAD><TITLE>");
client.print("Maschinensteuerung");
client.print("</TITLE>");
client.print("</HEAD><BODY>");
client.print("<h2 align=center><font size=7><b> Maschinensteuerung </b></font></h2>");
client.print("<form action=/action_page.php> method=post");
client.print("<label> IP Broker: </label>");
client.print("<input type=text id=ipbroker name=ipbroker> value=''
");
client.print("<label> Port Broker: </label>");
client.print("<input type=text id=portbroker name=portbroker>
");
client.print("<label> Bezeichnung Maschine: </label>");
client.print("<input type=text id=maschine name=maschine>
");
client.print("<label> Bezeichnung Eingang 1: </label>");
client.print("<input type=text id=eingang1 name=eingang1>
");
client.print("<label> Bezeichnung Eingang 2: </label>");
client.print("<input type=text id=eingang2 name=eingang2>
");
client.print("<label> Bezeichnung Eingang 3: </label>");
client.print("<input type=text id=eingang3 name=eingang3>
");
client.print("<label> Bezeichnung Eingang 4: </label>");
client.print("<input type=text id=eingang4 name=eingang4>
");
client.print("<label> Bezeichnung Eingang 5: </label>");
client.print("<input type=text id=eingang5 name=eingang5>
");
client.print("<input type=submit value=Senden>");
client.print("<form>");
delay(500);
client.stop();
}
}
}
}
Hallo, ich möchte die Daten, welche auf dem WebServer eingegeben worden sind in eine Variable speichern und diese dann mit dem Arduino nutzen! Wie muss dabei vorgegangen werden?