Garbled Serial Output

I'm having issues with garbled serial output. The strange thing is that it's always at the same part of the output.

For example

Serial.print("Pressure (kPa): "); Serial.print(pressureKPA, 2); Serial.println(" kPa");
Serial.print("Int Pressure (kPa): "); Serial.print(tempA); Serial.println(" kPa");

It will print the first sentence perfectly, but it will always mess up the word pressure in the second one. I have tried it at a few different baud speeds and it's always the same.

Any suggestions?

Yes.

  • Tell us what kind of Arduino you have.
  • Properly post your entire sketch. The problem is probably in the part that you did not post.

To post code and/or error messages:

  1. Use CTRL-T in the Arduino IDE to autoformat your complete code.
  2. Paste the complete autoformatted code between code tags (the </> button)
    so that we can easily see and deal with your code.
  3. Paste the complete error message between code tags (the </> button)
    so that we can easily see and deal with your messages.
  4. If you already posted without code tags, you may add the code tags by
    editing your post. Do not change your existing posts in any other way.
    You may make additional posts as needed.

Before posting again, you should read the three locked topics at the top of the Programming Questions forum, and any links to which these posts point.

If your project involves wiring, please provide a schematic and/or a wiring diagram and/or a clear photograph of the wiring.

Good Luck!