So you're a Noob? Post your questions here until you graduate! Don't be shy.

User avatar
By rudy
#75838
1) I could not find Setup on any of the menu items, so I couldn't load ESP.eraseConfig(); in Setup.


Setup() in your example sketch/program.

Code: Select allvoid setup()
{
 Serial.begin(115200);
 Serial.println();

ESP.eraseConfig();        // PUT IT HERE

 WiFi.begin("network-name", "pass-to-network");

 Serial.print("Connecting");
 while (WiFi.status() != WL_CONNECTED)
 {
 delay(500);
 Serial.print(".");
 }
 Serial.println();

 Serial.print("Connected, IP address: ");
 Serial.println(WiFi.localIP());
}


That should compile. If you get errors then you might have to reinstall Windows. :o Sorry that was from an earlier life. But maybe there is something that didn't go right when you installed the ESP8266 code. How did you do this? One way is through Board Manager (I think, read about it, never done it that way) the other is to include a link in the Preferences file. File>Preferences and add on the line Additional Boards Manager URLs: http://arduino.esp8266.com/stable/packa ... index.json

I'm working right now so I can't spend much time on this. Not that I would have anything else to add. Did you have any of the example files work? I assume Blink.ino worked.
User avatar
By SupDoc
#75839 That did not help. I have installed the ESP8266 months ago. I have used it successfully using interrupts and other sophisticated sketches with serial communicatons. i just did a tear down on my last project. I will try a couple of simple examples & see how they go. I'll get back to you in a couple of days. Thanks for your halp.
User avatar
By g6ejd
#75840 There is nothing wrong with the sketch, most likely reasons are:
1. The Wi-Fi credentials for your network are case sensitive and they have been entered incorrectly your sketch.
2. Your ESP8266 is faulty.

Q1. Does a simple Blink sketch work OK? If so, focus on your Router to see if is allowing connections?
Q2. Do you have e.g. a phone that connects OK to the same Router? But iPhone and many other can connect at 5.8GHz, so be aware of this test outcome.
Q3. How many devices are connected to your Router? Some have a limit of 32 devices.
Q4. Is your Router a 2.4GHz unit, many later ones are 5.8GHz