I have flashed the esp-12 with my custom Arduino code. It works great. I control a couple of Solid State Relays with it. No problem there.
What bothers me is something funny indeed. Nowhere in my code, have I specified Wireless Connections. Nowhere! But, right after flashing or even regular restarts, the damn thing connects to my wifi?!? How is that possible?
N.B.: Around 2 weeks ago, I had once played around with the AT command set. I had given it the user/pass. But, I have flashed it, re-uploaded my code a hundred times after it.
This is just how the ESP8266 works. It saves your authentication information to non-volatile memory that is not erased when you upload a new sketch and automatically connects unless you tell it not to in your code. You actually need to set different information to overwrite the previous.
Yes to all your suggestions. Turns out that the ESP doesn’t get “all” of its memory flashed when I re-upload sketches to it. So, I can invoke the EEPROM libs to delete it.