Newbie question:

I need to pass the last byte of a local IP as a parameter. Eg.: when Ethernet.localIP() returns, I need to extract the 100 and put it in a char array or string.

Anyone any ideas? Thx!


localIP() returns an IPAddress object. That object has an operator for [] allowing you to access the individual parts of it.

IPAddress ip = Ethernet.localIP();
| improve this answer | |
  • As simple as that :-) Thx! – KVdaele Dec 18 '15 at 22:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.