-
-
Notifications
You must be signed in to change notification settings - Fork 71
Serial Monitor Not working for my NodeMCU 1.0 board #127
Comments
I use ESP32, same problem. Serial plotter isn't working. |
@techiesms, @Master811129 can you please share your |
Assuming you are using the |
I did the followings to reproduce the issue:
The error was:
Please provide the steps you did. Otherwise, I cannot reproduce and fix the defect. Thank you! |
Same happening with a esp8266 using the NodeMCU 1.0 ESP-12E Module. |
@Locotron, can you please share your sketch that works with the Java-based Arduino IDE but not the PRO IDE? |
#include <NTPClient.h>
// change next line to use with another board/shield
#include <ESP8266WiFi.h>
//#include <WiFi.h> // for WiFi shield
//#include <WiFi101.h> // for WiFi 101 shield or MKR1000
#include <WiFiUdp.h>
const char *ssid = "<SSID>";
const char *password = "<PASSWORD>";
WiFiUDP ntpUDP;
// By default 'pool.ntp.org' is used with 60 seconds update interval and
// no offset
NTPClient timeClient(ntpUDP);
// You can specify the time server pool and the offset, (in seconds)
// additionaly you can specify the update interval (in milliseconds).
// NTPClient timeClient(ntpUDP, "europe.pool.ntp.org", 3600, 60000);
void setup(){
Serial.begin(115200);
WiFi.begin(ssid, password);
while ( WiFi.status() != WL_CONNECTED ) {
delay ( 500 );
Serial.print ( "." );
}
timeClient.begin();
}
void loop() {
timeClient.update();
Serial.println(timeClient.getFormattedTime());
delay(1000);
} Same used in https://github.com/arduino-libraries/NTPClient example. As you can see it shows the time on the Java version serial monitor, but not in the pro ide |
For the record, on how to set up basic HTTP client/server over WiFi for ESP8266:
Code: #include <ESP8266WiFi.h>
#include <ESP8266WiFiMulti.h>
#ifndef STASSID
#define STASSID "YOUR_SSID"
#define STAPSK "YOUR_PWD"
#endif
const char* ssid = STASSID;
const char* password = STAPSK;
const char* host = "ipv4 - Wi-Fi is connected to "YOUR_SSID" and has the IP address and start a server `nc -v -l 3000`";
const uint16_t port = 3000;
ESP8266WiFiMulti WiFiMulti;
void setup() {
Serial.begin(115200);
// We start by connecting to a WiFi network
WiFi.mode(WIFI_STA);
WiFiMulti.addAP(ssid, password);
Serial.println();
Serial.println();
Serial.print("Wait for WiFi... ");
while (WiFiMulti.run() != WL_CONNECTED) {
Serial.print(".");
delay(500);
}
Serial.println("");
Serial.println("WiFi connected");
Serial.println("IP address: ");
Serial.println(WiFi.localIP());
delay(500);
}
void loop() {
Serial.print("connecting to ");
Serial.print(host);
Serial.print(':');
Serial.println(port);
// Use WiFiClient class to create TCP connections
WiFiClient client;
if (!client.connect(host, port)) {
Serial.println("connection failed");
Serial.println("wait 5 sec...");
delay(5000);
return;
}
// This will send the request to the server
client.println("hello from ESP8266");
//read back one line from server
Serial.println("receiving from remote server");
String line = client.readStringUntil('\r');
Serial.println(line);
Serial.println("closing connection");
client.stop();
Serial.println("wait 5 sec...");
delay(5000);
} Serial-monitor output:
Terminal output:
|
When I connect my ESP8266 board, the CLI does not know its name (
|
The same is happening on my Arduino IDE. Even when I upload a simple WiFi- connect program doesn't start. And if it does start it shows some kind of gibberish. I tried resetting, it doesn't work. I also tried flashing the node mcu 1.0 using The node mcu flasher. It worked once and failed to start the next time. |
@akshaycool040506 Thank you |
Describe the bug
I just upload a normal HTTP Basic code on my NodeMCU board and when I open the serial monitor in new Arduino Pro IDE I was not getting Any response there. While I open the Serial monitor on Classic Arduino IDE I was getting the response there
Expected behavior
I should also get the reponse on serial monitor of Arduino Pro IDE
Screenshots
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: