Hello there! I am new to Arduino and I recently bought an ESP8266 12E Development Board to try to connect to WIFI and try some stuff out. I have connected my esp8266 to my PC using a usb cable. I tried running the following code:
#include <ESP8266WiFi.h>
#ifndef STASSID
#define STASSID "my-ssid"
#define STAPSK "mypasswd"
#endif
const char* ssid = STASSID;
const char* password = STAPSK;
void setup() {
Serial.begin(9600);
Serial.println();
Serial.println();
Serial.print("Wait for WiFi... ");
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
Serial.print(".");
delay(500);
}
Serial.println("");
Serial.println("WiFi connected");
Serial.println("IP address: ");
Serial.println(WiFi.localIP());
delay(500);
}
void loop() {
digitalWrite(2, HIGH);
delay(200);
digitalWrite(2, LOW);
delay(2000);
}
The console shows: "WARNING: Detected crystal freq 13.54MHz is quite different to normalized freq 26MHz. Unsupported crystal in use?" and also none of the print statements work, I see some boxes on the console.
My console output:
. Variables and constants in RAM (global, static), used 28268 / 80192 bytes (35%)
║ SEGMENT BYTES DESCRIPTION
╠══ DATA 1504 initialized variables
╠══ RODATA 988 constants
╚══ BSS 25776 zeroed variables
. Instruction RAM (IRAM_ATTR, ICACHE_RAM_ATTR), used 60267 / 65536 bytes (91%)
║ SEGMENT BYTES DESCRIPTION
╠══ ICACHE 32768 reserved space for flash instruction cache
╚══ IRAM 27499 code in IRAM
. Code in flash (default, ICACHE_FLASH_ATTR), used 238864 / 1048576 bytes (22%)
║ SEGMENT BYTES DESCRIPTION
╚══ IROM 238864 code in flash
esptool.py v3.0
Serial port COM6
Connecting....
Chip is ESP8266EX
Features: WiFi
WARNING: Detected crystal freq 13.54MHz is quite different to normalized freq 26MHz. Unsupported crystal in use?
Crystal is 26MHz
MAC: 48:e7:29:6d:1c:e1
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Auto-detected Flash size: 4MB
Compressed 273008 bytes to 200774...
Writing at 0x00000000... (7 %)
Writing at 0x00004000... (15 %)
Writing at 0x00008000... (23 %)
Writing at 0x0000c000... (30 %)
Writing at 0x00010000... (38 %)
Writing at 0x00014000... (46 %)
Writing at 0x00018000... (53 %)
Writing at 0x0001c000... (61 %)
Writing at 0x00020000... (69 %)
Writing at 0x00024000... (76 %)
Writing at 0x00028000... (84 %)
Writing at 0x0002c000... (92 %)
Writing at 0x00030000... (100 %)
Wrote 273008 bytes (200774 compressed) at 0x00000000 in 10.4 seconds (effective 209.2 kbit/s)...
Hash of data verified.
Leaving...
Hard resetting via RTS pin...
Note: I have installed the "CP2102" driver it says on the other side of the ESP to install and it also mentions to use baud rate 9600