Serial Monitor not carriage returning

Hello all.

Very new to this but I'm working through the project book that came with my starter kit and I'm currently working on project 5 with the servo motor. Everything seems to be functioning fine once I was done, my issue is with the serial monitor. It doesn't appear to be performing a carriage return after each loop. I've tried selecting all 4 options at the bottom (No line ending, Newline, Carriage return, Both NL & CR) and it still seems to just print continually in one line across.

Not really a huge deal but I just want to be sure its not something I've done or if there is a way to correct it.

Thanks in advance.

Your post was MOVED to its current location as it is more suitable

Are you using Serial.print() rather than Serial.println() to print the data ?

Please post your full sketch

Please follow the advice given in the link below when posting code, in particular the section entitled 'Posting code and common code problems'

Use code tags (the </> icon above the compose window) to make it easier to read and copy for examination

Give an example of the situation where you want a line feed.

This refers only to sending something from serial monitor to the Arduino. Printing a 'new line' on receiving depends wether an new line has been sent by the Arduino. And that's the difference between
Serial.print( something ); //without new line
and
Serial.println(something); // with new line

That's exactly what it was. Thank you. The last part of my serial.print I had forgotten the "ln" at the end. I even went through past projects knowing i had seen it before but i missed it obviously.

Thanks for the help and sorry for the inconvenience.

#include <Servo.h>
Servo myServo;
int const potPin = A0;
int potVal;
int angle;
void setup() {
  myServo.attach(9);
  Serial.begin(9600);
}
void loop() {
  potVal = analogRead(potPin);
  Serial.print("potVal: ");
  Serial.print(potVal);
  angle = map(potVal, 0, 1023, 0, 179);
  Serial.print(", angle: ");
  **Serial.println(angle);**
  myServo.write(angle);
  delay(15);
}

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.