1

Serial Monitor

My Serial Monitor is displaying unreadable characters. If anybody can give me some insight on why this would be happening please let me know.

Thank You.

Avamander
  • 624
  • 2
  • 11
  • 35
The Tokenizer
  • 183
  • 2
  • 7
  • 3
    It greatly helps to post the code as text (copy from IDE, paste here) - that way people can copy/paste it into their own IDE for testing. What you have done forces people to read from your image, and retype. Please format the code using the code formatting markdown (four leading spaces). For help see Markdown help. You should be able to do this by selecting the code and pressing Ctrl+K to have your browser do this for you. – Nick Gammon Feb 26 '16 at 05:28
  • I changed from 9600 to Serial.begin(115200) and matched the serial monitor to 115200 and it worked. Went back to 9600 and back to same error. Interesting to know wht – IanO May 28 '21 at 20:06

3 Answers3

6

Change Serial.write to Serial.print (or Serial.println).

write writes in binary, which gives you unprintable characters.

Nick Gammon
  • 38,184
  • 13
  • 65
  • 124
  • I am facing same issue https://arduino.stackexchange.com/questions/38289/at-commands-is-sending-response-in-square-box-on-serial-monitor can you help me what I am doing wrong – N Sharma May 12 '17 at 19:12
  • I changed Serial.print as well but no success – N Sharma May 12 '17 at 19:19
3

Make sure the selected baud (like 115200, 57600) in Serial Monitor matched the one specified in code like Serial.begin(115200)

1

I had the same problem, baud rate was the same in the code as it was in the serial monitor. I tried changing the baud rate in the code to 19200 and the same in the serial terminal and that fixed the problem. Hope this helps, not sure why it wasn't working with the 9600 baud value. Also found that clicking on the wrong baud rate in the terminal and back on the right one fixed the issue with it displaying gibberish.