Anyway, as far as i understand the code you read the value rate with a count to the end of rate=*.
So what is if i dont know if there are one or two digits? In the example the code is based on the knowledge that it must be pch+5 which would say that the
value can only 0-9. But what if the possible range is unknown?
atoi does not just convert the one character. It will convert all numeric characters until it hits a non-numeric character.
Your request should look like this
GET /?mode=steady&rate=305&color=yellow HTTP/1.0
so when you do the atoi(pch+5), it would return the integer value 305. The (pch+5) is a pointer addition. It will start converting to an integer at the 5th position after the start of the string. That is the character after the '='.
edit: As the program goes through the loop, pch will be equal to (pointing at) these strings in each iteration:
GET /
mode=steady
rate=305
color=yellow
HTTP/1.0