How can I read an IP address from an SD card

I would like the ability to store the IP address of my arduino project on an SD card. This would allow me or anyone else change the ip address of the device without having to alter the programming. The variable in the program is written as:

byte ip = {10,7,136,77};

Any tips or hints would be appreciated

I assumed that you know how to write on SD, right?

For reading:
Have you tried this one?

I could imagine that with this part you could find your IP from the file..

// read from the file until there's nothing else in it:
while (myFile.available()) 
{
     Serial.write(myFile.read());
}

=>

// read from the file until there's nothing else in it:
String ipString = "";

while (myFile.available()) 
{
    ipString += myFile.read();
}

...and with these you can subString your IP-part.. If there aren't anything else than for example "10,7,136,77" I think it shouldn't be a problem to your setup()-function to find it from the sd-file and chew it to "byte ip = {};" for example with getBytes-function..

Also in here you can find some info about reading from SD-cards..

TommiP

This is an older post that I used to get network settings from the SD card.