Serial comunication

I am having trouble using the serial monitor with my Arduino Uno R3. Everything I send to the serial monitor using both Serial.print and Serial.write is displayed in extended ASCII Codes. what I understand is that Serial. Write should display the message as the actual text, where Serial. print displays it in ASCII codes. How can I get the serial monitor to display the number as the text, Would the code be wrong, or are there some settings I need to change? Here is the code I am using:
/*

  • SerialOutput sketch
  • Print numbers to the serial port
    */
    void setup()
    {
    Serial.begin(9600); // send and receive at 9600 baud
    }

int number = 0;

void loop()
{
Serial.print("The number is ");
Serial.println(number); // print the number
Serial.write(number);
delay(500); // delay half second between numbers
number++; // to the next number
}

Yawn

  1. Always post code in code tags

  2. Always use the auto format tool before posting

  3. At least try and compile the code before posting

THE FORUM POSTING RULES ARE AT THE TOP OF THE FORUM - THEY APPLY TO YOU AND TO EVERY ONE ELSE.

Mark

Everything I send to the serial monitor using both Serial.print and Serial.write is displayed in extended ASCII Codes.

Wrong

Show us what the serial monitor is showing you (yawn - highlight cut paste (in code or quote tags)

Mark

what I understand is that Serial. Write should display the message as the actual text, where Serial. print displays it in ASCII codes.

Nonsense. Serial.print() is for sending text. Serial.write() is for sending binary data.

Sorry for the poor post, anyways here is the code and the information from the serial monitor.

void setup()
{
  Serial.begin(9600); // send and receive at 9600 baud
}

int number = 0;

void loop()
{
  Serial.print("The number is ");
  Serial.println(number);    // print the number
Serial.write(number);
  delay(500); // delay half second between numbers
  number++; 
  delay(1000);}

Serial monitor:

`fžfžffžfx˜˜æø˜˜€

That looks like the wrong baud rate. It's really printing "The number is" as that garbage? Then it's definitely the wrong baud rate.

The baud rate from the sketch matches the rate in the settings, but my main concern is the language it prints in.

There is only one language. Binary.

Print Screen your Serial Monitor and show us the baud setting. IMGUR for free image hosting if you are stuck for that...

Try using a different serial terminal program such as puTTY

...R

Solved! The issue was in fact the baud rate, only the incorrect baud rate was in the port settings.

Which dickhead you would have been told had you posted the output of the serial monitor!

Mark