softwareserialexample

Hi,

I'm testing the software serial example on may arduino uno.
but the only text that I get in the serial monitor is goodnight moon and only ones. the hello, world text does not show.

what goes wrong? or do I misunderstand this code?

Post your code.

Are you using softwareserial on pins 0 and 1? If yes, did you say Serial.begin()? You shouldn't.

it just the example in arduin0 1.0 for softwareserial

#include <SoftwareSerial.h>

SoftwareSerial mySerial(2, 3);

void setup()  
{
  Serial.begin(57600);
  Serial.println("Goodnight moon!");

  // set the data rate for the SoftwareSerial port
    pinMode(2, INPUT);
  pinMode(3, OUTPUT);
  mySerial.begin(4800);
  mySerial.println("Hello, world?");
}

void loop() // run over and over
{
 
  
  if (mySerial.available()> 0){
    Serial.write(mySerial.read());
  
  }
  if (Serial.available() > 0){
    mySerial.write(Serial.read());
 
  }
}

Well the software serial is on pins 2 and 3. The usb to serial chip is only on pins 0 and 1, for use with hardware serial. You only need software serial if you're talking to another device that uses serial, like some GPS receivers.

that is exactly what I want to do. but before experimenting with the gps i just want to send some text to this software serial on catch it and send it back to my usb serial

that is exactly what I want to do. but before experimenting with the gps i just want to send some text to this software serial on catch it and send it back to my usb serial

So, what DO you have connected to pins 2 and 3?