arduino program output issue

i am using this code in my arduino as sketch but on serial monitor the the output is

Goodnight moon!

mySerial.println(“Hello, world?”); output not showing .

pls help me

my code is below.

#include <SoftwareSerial.h>

SoftwareSerial mySerial(10, 11); // RX, TX

void setup() {
// Open serial communications and wait for port to open:
while (!Serial) {
; // wait for serial port to connect. Needed for native USB port only

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()) {

How many Arduinos are you using, which boards and how are they connected ?

That baud rate for SoftwareSerial is too high. Try 9600.
And address Bob’s questions regarding your setup. :slight_smile:

Edit: Oh, and also you should always post your code between code tags. They can be generated using the </> button in the post or “Reply” windows, or manually typed like this:-

[code]Place your code here[/code]``It will appear in a block like this


Serial.println("Goodnight moon!");

Is sent out on the programming port that your monitor is connected to.

  mySerial.println("Hello, world?");

Is sent out the following port;

SoftwareSerial mySerial(10, 11); // RX, TX

Defines the port which I don't think you are connected to with your monitor.

Tom... :)

Hi ,

  1. Board - Arduino Uno

2 . I worked with baud rate then problem is at is.

Thanks all for your response.

  1. i connected with VGA port to Arduino.

The code is designed to work with two Arduinos connected back to back to demonstrate the use of SoftSerial in communicating with one another.