- Tue Feb 02, 2016 12:27 pm
#40282
Thanks for the information, I'll keep that in mind when including any SDK libraries.
To answer your question, I was trying to stitch together some code examples I saw that would allow me to ping other devices with the ESP8266. The only code I found was using the ping.h library from the SDK, so the code snippets used the ip_addr.h include.
I actually wasn't aware of the Arduino IPAddress.h until you pointed it out, thanks! I checked it out, and it seems like that while it's a bit different, the same functionality is there. Namely, with ip_addr.h I can call ip_addr("192.168.0.1") and get a uint32 form that I need. With IPAddress.h I need to create an IPAddress object, use fromString to populate the _address field, and then use the overloaded cast to uint32. So the functionality is definitely there, but it seems like for this particular purpose, it's a few more lines of code. I'll switch over to using IPAddress.h though since it's already included when I include ESP8266WiFi.h. Thanks for the information!