int getIntFromString (char *stringWithInt, byte num)// input: pointer to a char array// returns an integer number from the string (positive numbers only!)// num=1, returns 1st number from the string// num=2, returns 2nd number from the string, and so on{ char *tail; while (num>0) { num--; // skip non-digits while ((!isdigit (*stringWithInt))&&(*stringWithInt!=0)) stringWithInt++; tail=stringWithInt; // find digits while ((isdigit(*tail))&&(*tail!=0)) tail++; if (num>0) stringWithInt=tail; // new search string is the string after that number } return(strtol(stringWithInt, &tail, 0));} //------------------------------------------------------------------------------

void setup(void) { Serial.begin(9600); // the next three lines are for Arduino UNO and Ethernet Shield pinMode(10, OUTPUT); // set the SS pin as an output (necessary!) digitalWrite(10, HIGH); // but turn off the W5100 chip! if (!sd.begin(4,SPI_HALF_SPEED)) sd.initErrorHalt();

// remove comment from the next line to create the config file// makeIpConfigFile();