Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By Hendery
#83171 Hi,

I am new to the group, so be kind. I am also just above noob level in C programing so bear with me. I am using the Arduino SDK to code in and push the code to my ESP8266 and ESP32. The following code works great on my ESP32, but causes a CPU panic on my ESP8266. The area I am having problems with is where I am trying to get the fourth node of my IP address. I want to use this variable as part of the MQTT name and topic. As I mentioned, this works on my ESP32 just fine.

Code: Select allfroM = WiFi.localIP().toString().lastIndexOf(".")+1;
  tO = WiFi.localIP().toString().length()+1;

  nodeFour = WiFi.localIP().toString().substring(froM, tO).c_str();


I have also attached the complete code.

Any help would be greatly appreciated.
You do not have the required permissions to view the files attached to this post.