Can Any One Write me Full program I have main part
hi,
i have program external ip address not complete arduino mega.
please can expert write me full program can run on mega...
thanks in advance.
here code
_________________________________________________
void getip()
{
if (client.connect("api.ipify.org", 80))
{
terminal1.println("connected api.ipify.org");
terminal1.println();
terminal1.flush();
client.println("get / http/1.0");
client.println("host: api.ipify.org");
client.println();
}
else
{
terminal1.println("connect api.ipify.org failed");
terminal1.println();
terminal1.flush();
}
while(client.connected() && !client.available());
while (client.connected() || client.available())
{
char c = client.read(); //gets byte ethernet buffer
readstring += c; //places captured byte in readstring
}
client.stop(); //stop client
newip = readstring.substring(153);
serial.println(newip);
serial.println();
terminal1.println(newip);
terminal1.println();
terminal1.flush();
readstring="";
}
i have program external ip address not complete arduino mega.
please can expert write me full program can run on mega...
thanks in advance.
here code
_________________________________________________
void getip()
{
if (client.connect("api.ipify.org", 80))
{
terminal1.println("connected api.ipify.org");
terminal1.println();
terminal1.flush();
client.println("get / http/1.0");
client.println("host: api.ipify.org");
client.println();
}
else
{
terminal1.println("connect api.ipify.org failed");
terminal1.println();
terminal1.flush();
}
while(client.connected() && !client.available());
while (client.connected() || client.available())
{
char c = client.read(); //gets byte ethernet buffer
readstring += c; //places captured byte in readstring
}
client.stop(); //stop client
newip = readstring.substring(153);
serial.println(newip);
serial.println();
terminal1.println(newip);
terminal1.println();
terminal1.flush();
readstring="";
}
author of code says works on mega
also, nice name!
also, nice name!
Arduino Forum > Community > Gigs and Collaborations > Can Any One Write me Full program I have main part
arduino
Comments
Post a Comment