I cannot get SoftwareSerial to work

I cannot get the software serial library to work with my arduino uno.

I tried to run the sample code from


#include <SoftwareSerial.h>
SoftwareSerial mySerial(10, 11); // RX, TX

void setup()  
  // Open serial communications and wait for port to open:

  Serial.println("Goodnight moon!");

  // set the data rate for the SoftwareSerial port
  mySerial.println("Hello, world?");

void loop() // run over and over
  if (mySerial.available())
  if (Serial.available())

But all I get in the console window is a single line “Goonight moon”
Has anyone had this issue?

What device is D10 and D11 connected to?

Are you using 2 Arduinos. Software Serial is 1/2 duplex and cant send and receive at the same time .