In the same program, I connect to a static IP address

In the same program, I connect to a static IP address, and after that I want to disconnect and reconnect with a dynamic IP address of the router's choice, but the nodemcu 8266 keeps the old IP address. I don't know exactly what tools regarding for this purpose, and thanks


IMG_20221114_144214_221

Have a read of how to use the forum and how to post code with code tags .
That way those keen enough can copy and run your code .

Providing the screenshots is useless.
Please insert the code as text in code tags.

Your topic has been moved to a more suitable location on the forum. Installation and Troubleshooting is not for advice on (nor for problems with) your project.