Hi,
I have an arduino compatible device with an ESP8266. Both work fine and using the BareMinimum script I can access the wifi, upload a tiny script that displays hello world on the ESP8266 with no problem.
I got excited and wanted to do the DHT11 project with ThingSpeak. Long story short, I narrowed the problem down to a wifi connection problem. Again, as I said with the bareminimum i am able to send all AT commands with no problems.
This is the script that I am presently using:
Most articles mention #include <ESP8266WiFi.h> but for me the script only compiles if the include is
#include <ESP8266wifi.h>
Notice the case in wifi vs WiFi. I think that shouldn't matter, but I am wondering why it is different for me.
Executing that code, I get "Connecting to Tundra....................." in the setup method.
Code is based on sparkfun script. I removed the parts that are irrelevant to the diagnosing the issue.
Thanks
#include <ESP8266wifi.h>
#include <WiFi.h>
const char* ssid = "Tundra";
const char* password = "MyPassword";
void setup() {
Serial.begin(115200);
delay(10);
// We start by connecting to a WiFi network
Serial.println();
Serial.println();
Serial.print("Connecting to ");
Serial.println(ssid);
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
Serial.println("");
Serial.println("WiFi connected");
Serial.println("IP address: ");
Serial.println(WiFi.localIP());
}
void loop() {
}