Announcement

Collapse
No announcement yet.

New Line in output to serial debug window?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • New Line in output to serial debug window?

    Sorry if this has been asked before.

    When I use:
    to(COM0);print("something");
    to(COM0);print("something else");

    the output is displayed on the same line. Is there a character or something that I can use to get the output to break on each line?

    Thanks,
    Evan.
    Cheers,
    Evan.

  • #2

    It's standard C escape sequences, so \n will give you a newline character
    Mark

    Comment


    • #3
      try
      "something\n" - \n is a new line in workshop

      most languages you would use the CR LF (ascii 13 10)
      so this should also work

      to(COM0);print("something",13,10);

      Comment


      • #4


        Thanks all. I had tried that but must have had a brain melt and used a forward slash instead.

        Thanks,
        Evan.
        Cheers,
        Evan.

        Comment

        Working...
        X