Hello
I have a quiestion
client.print(), This command prints the serial monitor Arduino IDE.
I have used in the Intel Galileo gen 2 but do not print anything.
Somebody knows why not print?
I want to get the code php of a small website and watch this in the serial monitor Arduino IDE.
code:
#include <Ethernet.h>
byte mac[] = { 0x98, 0x4F, 0xEE, 0x01, 0x6A, 0xF3 }; // mac intel galileo
// change to your network settings
IPAddress ip(192,168,0,33); // ip intel galileo
IPAddress gateway(192, 168, 0, 1); // gateway lan
IPAddress subnet(255, 255, 255, 0);
IPAddress server(192,168,0,15); // ip webserver
//char serverName[] = "www.localhost.com";
int serverPort = 80; //port
EthernetClient client;
void setup() {
Serial.begin(9600);
delay(2000);
Serial.println("Starting ethernet...");
Ethernet.begin(mac, ip, gateway, gateway, subnet);
Serial.println(Ethernet.localIP());
delay(2000);
Serial.println("Ready");
if (client.connect(server, 80)) {
Serial.println("connected"); // work ok
// Make a HTTP request:
client.println("GET /Paginaweb.php");
//client.println("Get 192,168,0,15/Paginaweb.php");
//client.println("Host: www.google.com");
//client.println("Connection: close");
//client.println();
}
else {
// kf you didn't get a connection to the server:
Serial.println("connection failed");
}
}
void loop() {
Serial.println(".....");
client.println("GET /Paginaweb.php");
delay(5000);
}