user18429: I have a very basic script that is supposed to display something to the serial monitor but no matter what I try the serial monitor won't display anything...I;ve watched about 5 tutorials now and each one has failed to display anything. Any ideas what I'm doing wrong?
Here is my code:
char rx_byte;

void setup() {
  Serial.begin(115200);
  pinMode(13, OUTPUT);
  digitalWrite(13, LOW);
}

void loop() {
  if(Serial.available() > 0){
    rx_byte = Serial.read();
    Serial.print("You typed: ");
    Serial.println(rx_byte);
    digitalWrite(13, HIGH);
    delay(1000);
    digitalWrite(13, LOW);
  }
}


user18503: You have to change the baud rate at the right bottom corner of the serial monitor to 115200 which you have assigned initially.
I have tested it  and
It doesn't matter if its int/char

user10794: 
Which one are you using?
The one closest to the reset button, I believe its the native...

This is more confusing than I realized. The Due has two ports:


Programming port
For programming, the programming port is easiest to use. And you can "talk" to the serial port using Serial, like this:
void setup ()
  {
  Serial.begin (115200);
  Serial.println ("Hello, world!");
  }  // end of setup

void loop ()
  {
  }  // end of loop


Native USB port
This lets you emulate USB devices (eg. keyboard, mice). However if you want to use it for Serial communications you need to use a different class SerialUSB like this:
void setup ()
  {
  SerialUSB.begin(115200);
  while (!SerialUSB) ; // wait for it to become ready
  SerialUSB.println ("Starting ...");
  }  // end of setup

unsigned long i;

void loop ()
  {
  SerialUSB.print ("Hello, world! Count = ");
  SerialUSB.println (++i);
  delay (1000);
  }  // end of loop

It also helps to wait for the serial port to become ready, as I did in setup. Otherwise you may miss the first 10 lines or so of serial output.

18429: <p>I have a very basic script that is supposed to display something to the serial monitor but no matter what I try the serial monitor won't display anything...I;ve watched about 5 tutorials now and each one has failed to display anything. Any ideas what I'm doing wrong?</p>

<p>Here is my code:</p>

<pre><code>char rx_byte;

void setup() {
  Serial.begin(115200);
  pinMode(13, OUTPUT);
  digitalWrite(13, LOW);
}

void loop() {
  if(Serial.available() &gt; 0){
    rx_byte = Serial.read();
    Serial.print("You typed: ");
    Serial.println(rx_byte);
    digitalWrite(13, HIGH);
    delay(1000);
    digitalWrite(13, LOW);
  }
}
</code></pre>
 18503: <p>You have to change the baud rate at the right bottom corner of the serial monitor to 115200 which you have assigned initially.
I have tested it  and
It doesn't matter if its int/char</p>
 10794: <blockquote>
<p>Which one are you using?</p>
<p>The one closest to the reset button, I believe its the native...</p>
</blockquote>
<p>This is more confusing than I realized. The Due has two ports:</p>
<p><a href="https://i.stack.imgur.com/FSR1a.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/FSR1a.jpg" alt="Due ports" /></a></p>
<hr />
<h2>Programming port</h2>
<p>For programming, the programming port is easiest to use. <strong>And</strong> you can &quot;talk&quot; to the serial port using <code>Serial</code>, like this:</p>
<pre><code>void setup ()
  {
  Serial.begin (115200);
  Serial.println (&quot;Hello, world!&quot;);
  }  // end of setup

void loop ()
  {
  }  // end of loop
</code></pre>
<hr />
<h2>Native USB port</h2>
<p>This lets you emulate USB devices (eg. keyboard, mice). However if you want to use it for Serial communications you need to use a different class <code>SerialUSB</code> like this:</p>
<pre><code>void setup ()
  {
  SerialUSB.begin(115200);
  while (!SerialUSB) ; // wait for it to become ready
  SerialUSB.println (&quot;Starting ...&quot;);
  }  // end of setup

unsigned long i;

void loop ()
  {
  SerialUSB.print (&quot;Hello, world! Count = &quot;);
  SerialUSB.println (++i);
  delay (1000);
  }  // end of loop
</code></pre>
<p>It also helps to wait for the serial port to become ready, as I did in <code>setup</code>. Otherwise you may miss the first 10 lines or so of serial output.</p>
