I've got Arduino IDE 1.8.5 for quite some time now.
I've been using ESP8266 (NodeMCU) to conrtol parts of my Smart Home for about two years now. Yesterday one of the blinds failed to go down and I found that the ESP8266 didn't set the output to the relay. So I decided to replace it with a new one. But: When I download the (old) sketch to the NodeMCU, I can't get neither a connection to the WIFI nor do I get anything useful out of the serial monitor. The serial connection (Serial.begin) is set to 115200, so is the monitor. I may use whatever baud rate I like, I just get rubbish. Apart from that, the WIFI does not connect.
Eventually I used a very simple sketch just to check the connection:
#include <ESP8266WiFi.h> // Include the Wi-Fi library
const char* ssid = "******"; // The SSID (name) of the Wi-Fi network you want to connect to
const char* password = "******"; // The password of the Wi-Fi network
void setup() {
Serial.begin(115200); // Start the Serial communication to send messages to the computer
delay(10);
Serial.println('\n');
WiFi.mode(WIFI_STA);
WiFi.begin(ssid, password); // Connect to the network
Serial.print("Connecting to ");
Serial.print(ssid);
while (WiFi.status() != WL_CONNECTED) { // Wait for the Wi-Fi to connect
delay(500);
Serial.print('.');
}
Serial.println('\n');
Serial.println("Connection established!");
Serial.print("IP address:\t");
Serial.println(WiFi.localIP()); // Send the IP address of the ESP8266 to the computer
}
void loop() {
}
The result in the monitor looks like this:
" ⸮nno⸮⸮⸮⸮|⸮⸮⸮o⸮nNo⸮⸮|⸮|⸮|⸮|⸮|⸮|⸮|⸮|⸮|⸮|⸮|⸮|⸮|⸮|⸮|⸮|⸮|⸮|⸮|⸮|⸮|⸮|⸮|⸮|⸮|⸮|⸮|⸮|"
This does tell me that the connection was refused. This does happen with two different access points (router and Raspberry) .
Any idea what's wrong?
CU Freddie