Hi,
I have just started getting into using WiFi modules and plan to use this one with an arduino for a project in future however I cannot seem to be able to connect to my home network and want to make sure this is setup before dabbling with the arduino.
Here is the code I have been working off:
#include <ESP8266WiFi.h> // Include the Wi-Fi library
const char* ssid = "VM082331-2G";
const char* password = "*****";
void setup() {
Serial.begin(115200);
delay(10);
Serial.println('\n');
WiFi.begin(ssid, password);
Serial.print("Connecting to ");
Serial.print(ssid); Serial.println(" ...");
int i = 0;
while (WiFi.status() != WL_CONNECTED) {
delay(1000);
Serial.print(++i); Serial.print(' ');
}
Serial.println('\n');
Serial.println("Connection established!");
Serial.print("IP address:\t");
Serial.println(WiFi.localIP());
}
void loop() {
Serial.println(WiFi.begin());
}
When uploading it doesn't give any errors but won't connect to my network even though the SSID and Password are the same here are their outputs.
Sketch uses 264672 bytes (25%) of program storage space. Maximum is 1044464 bytes.
Global variables use 26820 bytes (32%) of dynamic memory, leaving 55100 bytes for local variables. Maximum is 81920 bytes.
esptool.py v2.6
2.6
esptool.py v2.6
Serial port COM3
Connecting....
Chip is ESP8266EX
Features: WiFi
MAC: ***************
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Auto-detected Flash size: 4MB
Compressed 268832 bytes to 195875...
Writing at 0x00000000... (8 %)
Writing at 0x00004000... (16 %)
Writing at 0x00008000... (25 %)
Writing at 0x0000c000... (33 %)
Writing at 0x00010000... (41 %)
Writing at 0x00014000... (50 %)
Writing at 0x00018000... (58 %)
Writing at 0x0001c000... (66 %)
Writing at 0x00020000... (75 %)
Writing at 0x00024000... (83 %)
Writing at 0x00028000... (91 %)
Writing at 0x0002c000... (100 %)
Wrote 268832 bytes (195875 compressed) at 0x00000000 in 17.4 seconds (effective 123.6 kbit/s)...
Hash of data verified.
Leaving...
Hard resetting via RTS pin...
And Monitor
<<<stack<<<
last failed alloc call: 401001F0(32)
ets Jan 8 2013,rst cause:2, boot mode:(3,6)
load 0x4010f000, len 1384, room 16
tail 8
chksum 0x2d
csum 0x2d
v8b899c12
~ld
Connecting to VM082331-2G ...
1 2 3 4 5 6 7 8
Any help on this would be greatly appreciated
Thanks For Looking,
Ben