Analog Read Serial showing characters not voltage

Hi guys, just starting.

https://www.youtube.com/watch?v=nL34zDTPkcs&list=PLuhd7o-O54KmXrWQi3XkEhnVLy2eK4wp5

I was following an example of the AnalogReadSerial, first time I ran it, I was able to see the serial monitor display voltages, but it displayed them in a horizontal fashion, rather than vertical.

Enjoyed my results, and continued to test out other drawings and codes. Came back to AnalogReadSerial and now characters such as this "⸮x⸮⸮⸮⸮x" show up instead of my long missed voltage readings.

I am following the AnalogReadSerial that is found in the examples of the IDE and along with the youtube link above.

My 10k potentiometer outter legs are connected to 5V and GND, and my center pin is at analog 0.

Any help for understanding would be greatly appreciated.

I was following an example of the AnalogReadSerial

Did you "open" the Analog Read Serial Example or did you type it in, or change something?

Probably the most common reason for corrupted communication is a mismatch between the transmit and receive baud rates.

Did you select the correct Arduino model in the IDE? I assume you didn't change the baud rate?

...The Arduino's baud rate might get messed-up if the compiler thinks you're using a different Arduino with a different clock speed)

https://www.youtube.com/watch?v=nL34zDTPkcs&list=PLuhd7o-O54KmXrWQi3XkEhnVLy2eK4wp5

Is that link correct? It doesn't seem to have anything to do with your problem.

Weird characters in serial monitor indicate a baud rate mismatch.

Either the serial monitor and your sketch are set for different baud rates (the serial monitor must be set to match the baud rate set in Serial.begin()), or you compiled code for a different clock speed than your board is running at, and somehow managed to upload it (this often fails, because when uploading over serial, the baud rate usually depends on the clock rate that you've selected - but if uploading via an ISP programmer, or if the board you selected happens to use the same baud rate for serial uploads at two different clock speeds, you can end up in this situation.). But usually, you just set the serial monitor to a different baud rate and forgot.

This can also be caused by things that are interfering with pins 0 and 1 - for example, if you have another serial device connected to them that's trying to talk at the same time - even if the baud rates match, if two things are trying to talk via the same wire, the result will be gibberish.

Finally, you'll get gibberish if you're using an external serial adapter - say, it's a pro mini, which doesn't have the serial adapter on-board, the board is powered externally, and you forgot to connect the grounds.

(as an aside, someone experienced with debugging serial, using a serial monitor that shows the char codes for non-printing characters (the arduino serial monitor is garbage - it's convenient, but not good enough for anything other than basic use cases. I use hterm, which is a swiss-army-knife-and-a-half of a serial terminal), can often differentiate between these ;-) )

Hi,
Welcome to the forum.

Please read the first post in any forum entitled how to use this forum.
http://forum.arduino.cc/index.php/topic,148850.0.html then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.

but it displayed them in a horizontal fashion, rather than vertical.

You have a Serial.print somewhere in your code that should be Serial.println
If you copied this;
c1.jpg

The ln causes a carriage return, look closely at the code you have and the code you copied from?

Tom… :slight_smile:

Thanks for all in the info guys.

The baud rate in the serial monitor was not set to the correct rate... thats why my monitor was

Also misspelled "Serial.println" as "Serial.printIn", thats why my monitor was horizontal.

Thanks again!