Bad Characters in serial monitor output

I have the same problem with the text output for the serial monitor. Subscribed!

The same program and the same board ?

Hi,

I tried switching everything to 9600 baud, including driver settings, begin method, and serial monitor rate in output window. The behavior is the same.

including driver settings - or reinstalling ?
The speed is not important for such simple code

Yes, including driver settings. I will try reinstalling the windows driver for the MCU and let you know how it goes.

A=B

I will try reinstalling the windows driver for the MCU - That what i meant in post # 17

I tried uninstalling the windows driver for the MCU, then reinstalling it via a fresh copy from the driver website, and the same behavior occurs.

Edit- I also tried reinstalling the board software i.e. NodeMCU 1.0 (ESP-12E Module) package via the board manager, but this did not change the serial output.

I stumbled across someone that posted the same issue on stack overflow with the same board and found that setting the frequency on serial.begin to 74880 (Serial.begin(74880):wink: and setting the serial monitor output to 115200 did the trick.

I tried this myself and was able to get test back every 2 seconds as programmed. However, this does not feel like a satisfying fix for this issue, as the baud rate for begin and the serial monitor ought to match. The fact that they do not seems strange. There are some theories as to why this is the case the link below, where the original fix was posted.

https://arduino.stackexchange.com/questions/48249/esp8266-serial-sending-garbled-text

I'll consider this issue resolved for now since I can actually begin programming my MCU, but I'd appreciate any theories or ideas as to why this is behaving the way it does or any suggestions to get to where I can set my serial monitor and serial.begin to the same baud rate.

Also, for the other person who claimed to be having the same problem, and for any others who come across this thread, I had my baud rate set to 9600 in my windows driver settings, my Serial.begin at 74880, and my serial monitor output drop down option to 115200.

I hope this helps others who were/are having the same issue as me.

Good luck!

P.S. Thank you ted for your continued help and support.

Bad solution, that is it working for a simple program, for complex program you may have some problems.
Click; Tools>Upload method - what is saying there ?

You're right, it is a bad solution.

The upload option you're asking about was set to the highest value (921600), as per the seller's instructions.

I set the baud rate in code, the upload rate in tools, the serial monitor rate, and the driver rate to 115200. I still get garbled characters. The strange thing is that when I reset the board using the reset button on it, I get the 'boot up' text without any garbling, then when the program begins running immediately after, I get the garbled text again. After hitting reset, this is what is generated:

ets Jan 8 2013,rst cause:2, boot mode:(3,6)

load 0x4010f000, len 1384, room 16
tail 8
chksum 0x2d
csum 0x2d
v4ceabea9
~ld
Z⸮⸮⸮Z⸮⸮Q⸮Z⸮⸮⸮Z⸮⸮⸮Z⸮⸮Q⸮

The only effect changing the upload option in tools had was to drastically slow down the upload rate of the sketch to the board, as one would expect.

Click; Tools>Upload method - what is saying there ? - ?????

It gives me the option to set the upload rate to 9600, 57600, 115200, 256000, 512000, and 921600.

Follow the steps post #30, the problem is not a speed.

Post #30 says this:

ted:
Bad solution, that is it working for a simple program, for complex program you may have some problems.
Click; Tools>Upload method - what is saying there ?

I took a screenshot of the options I have when I go to tools (it is attached). None of the options are ‘Upload method’. That is why I assumed you meant ‘Upload speed’ since that was the closest thing that I had on my options list.

Hopefully the screenshot provides you with what you were looking for.

Untitled.png

Your screenshot is different than THE version 1.8.3 - consider to use this one.
The name of your programmer connecting PC with your board is ?
Debug port: - try change this.
The square letters - iti only one line or you have a new one every 2 sec. ?

ted:
Your screenshot is different than THE version 1.8.3 - consider to use this one.
The name of your programmer connecting PC with your board is ?
Debug port: - try change this.
The square letters - iti only one line or you have a new one every 2 sec. ?

I went back to the latest stable build of the Arduino IDE (1.8.5) after we tried with 1.8.3 yesterday. I will change back to 1.8.3 as you suggest.

There is no programmer involved- the NODEMCU board I am using allows for the board to be plugged directly into the PC via usb cable (the link for more info is in my first post). The setting chosen for that as per the screenshot is the default setting the IDE chose.

After installing 1.8.3, I set the debug port to Serial (the other option is Serial1).

With the USB driver set to 115200, the sketch written as such:

void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
}

void loop() {
// put your main code here, to run repeatedly:
Serial.println("test");
delay(2000);
}

and serial monitor set to 115200, this result is what is shown after ~30 seconds of letting the board run:

UUV⸮⸮⸮jVUR e⸮⸮ ⸮⸮⸮⸮⸮⸮⸮⸮⸮Z⸮⸮Q⸮Z⸮⸮Q⸮⸮⸮⸮⸮U⸮uPU⸮⸮VJ⸮⸮UUUV⸮⸮⸮⸮VUR E⸮⸮ ⸮⸮⸮⸮⸮⸮⸮⸮⸮Z⸮⸮Q⸮⸮⸮⸮⸮UJ⸮⸮⸮⸮⸮⸮U⸮⸮Z
UUV⸮⸮⸮jVUR e⸮⸮ ⸮⸮⸮⸮⸮⸮⸮⸮⸮Z⸮⸮Q⸮⸮⸮⸮⸮UJ⸮⸮⸮⸮⸮⸮U⸮kZ
UUV⸮⸮⸮jVUR e⸮⸮ ⸮⸮⸮⸮⸮⸮⸮⸮⸮Z⸮⸮⸮⸮⸮⸮⸮U⸮uPU⸮⸮VJ⸮⸮UUUV⸮⸮⸮⸮VUR E⸮⸮ ⸮⸮⸮⸮⸮⸮⸮⸮⸮Z⸮⸮Q⸮⸮⸮⸮⸮U⸮uPU⸮⸮VJ⸮⸮UUUV⸮⸮⸮⸮VUR E⸮⸮ ⸮⸮⸮⸮⸮⸮⸮⸮⸮Z⸮⸮Q⸮⸮⸮⸮⸮U⸮uPU⸮⸮⸮VJ⸮⸮UUUV⸮⸮⸮jVUR e⸮⸮ ⸮⸮⸮⸮⸮⸮⸮⸮⸮Z⸮⸮Q⸮⸮⸮⸮⸮UJ⸮⸮⸮⸮⸮⸮U⸮⸮Z
UUV⸮⸮⸮jVUR e⸮⸮ ⸮⸮⸮⸮⸮⸮⸮⸮⸮Z⸮⸮⸮⸮⸮⸮⸮U⸮⸮⸮⸮⸮⸮⸮U⸮⸮Z
UUV⸮⸮⸮⸮VUR E⸮⸮ ⸮⸮Z⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮Z⸮⸮⸮⸮⸮⸮⸮UJ⸮⸮⸮⸮⸮⸮U⸮kZ
UUV⸮⸮⸮jVUR e⸮⸮ ⸮⸮⸮⸮⸮⸮⸮⸮⸮Z⸮⸮⸮⸮⸮⸮⸮U⸮uPU⸮⸮VJ⸮⸮UUUV⸮⸮⸮⸮VUR E⸮⸮ ⸮⸮⸮⸮⸮⸮⸮⸮⸮Z⸮⸮⸮⸮⸮⸮⸮U⸮uPU⸮⸮VJ⸮⸮UUUV⸮⸮⸮⸮VUR E⸮⸮ ⸮⸮⸮⸮⸮⸮⸮⸮⸮Z⸮⸮Q⸮⸮⸮⸮⸮U⸮⸮⸮⸮⸮⸮⸮U⸮kZ
UUV⸮⸮⸮jVUR e⸮⸮ ⸮⸮⸮⸮⸮⸮⸮⸮⸮Z⸮⸮⸮⸮⸮⸮⸮UJ⸮⸮⸮⸮⸮⸮U⸮⸮Z
UUV⸮⸮⸮⸮VUR e⸮⸮ ⸮⸮⸮⸮⸮⸮⸮⸮⸮Z⸮⸮Q⸮⸮⸮⸮⸮U⸮uPU⸮⸮VJ⸮⸮UUUV⸮⸮⸮⸮VUR E⸮⸮ ⸮⸮⸮⸮⸮⸮⸮⸮⸮Z⸮⸮Q⸮⸮⸮⸮⸮U⸮⸮⸮⸮⸮⸮⸮U⸮kZ
UUV⸮⸮⸮jVUR e⸮⸮ ⸮⸮Z⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮Z⸮⸮⸮⸮⸮⸮⸮U⸮uPU⸮⸮VJ⸮⸮UUUV⸮⸮⸮jVUR E⸮⸮ ⸮⸮⸮⸮⸮⸮⸮⸮⸮Z⸮⸮⸮⸮⸮⸮⸮U⸮uPU⸮⸮⸮VJ⸮⸮UUUV⸮⸮⸮⸮VUR e⸮⸮ ⸮⸮⸮⸮⸮⸮⸮⸮⸮Z⸮⸮Q⸮⸮⸮⸮⸮U⸮uPU⸮⸮VJ⸮⸮UUUV⸮⸮⸮jVUR e⸮⸮ ⸮⸮⸮⸮⸮⸮⸮⸮⸮Z⸮⸮Q⸮⸮⸮⸮⸮UJ⸮⸮⸮⸮⸮⸮U⸮⸮Z
UUV⸮⸮⸮⸮VUR E⸮⸮ ⸮⸮⸮⸮⸮⸮⸮⸮⸮Z⸮⸮⸮⸮⸮⸮⸮UJ⸮⸮⸮⸮⸮⸮U⸮⸮Z
UUV⸮⸮⸮⸮VUR E⸮⸮ ⸮⸮⸮⸮⸮⸮⸮⸮⸮Z⸮⸮Q⸮⸮⸮⸮⸮U⸮uPU⸮⸮VJ⸮⸮UUUV⸮⸮⸮jVUR e⸮⸮ ⸮⸮⸮⸮⸮⸮⸮⸮⸮Z⸮⸮Q⸮⸮⸮⸮⸮U⸮⸮⸮⸮⸮⸮⸮U⸮kZ
UUV⸮⸮⸮jVUR e⸮⸮ ⸮⸮⸮⸮⸮⸮⸮⸮⸮Z⸮⸮⸮Z⸮⸮⸮⸮⸮⸮⸮U⸮uPU⸮⸮VJ⸮⸮UUUV⸮⸮⸮jVUR e⸮⸮ ⸮⸮⸮⸮⸮⸮⸮⸮⸮Z⸮⸮⸮

It does not consistently produce new lines of code each iteration of the loop.

Upload Blinking led program, and post this program here

Sure. Here’s the example program as per the instructions I followed to setup the board:

/*
 ESP8266 Blink by Simon Peter
 Blink the blue LED on the ESP-01 module
 This example code is in the public domain
 
 The blue LED on the ESP-01 module is connected to GPIO1 
 (which is also the TXD pin; so we cannot use Serial.print() at the same time)
 
 Note that this sketch uses LED_BUILTIN to find the pin with the internal LED
*/

void setup() {
  pinMode(LED_BUILTIN, OUTPUT);     // Initialize the LED_BUILTIN pin as an output
}

// the loop function runs over and over again forever
void loop() {
  digitalWrite(LED_BUILTIN, LOW);   // Turn the LED on (Note that LOW is the voltage level
                                    // but actually the LED is on; this is because 
                                    // it is active low on the ESP-01)
  delay(1000);                      // Wait for a second
  digitalWrite(LED_BUILTIN, HIGH);  // Turn the LED off by making the voltage HIGH
  delay(2000);                      // Wait for two seconds (to demonstrate the active low LED)
}

The program is uploaded and works still.