SoftwareSerial on Arduino UNO R3 dont init

Hello, I´m trying with this code http://arduino.cc/hu/Reference/SoftwareSerial to work in Arduino UNO r3. I have only changed the baud rate to 57600 in order to read the output in the serial monitor.

After some experiments, I was able to figure out that if I dont call Serial.begin() and tx is defined in the pin 1, the library outputs the string.

Further more, I made some debugging and SoftwareSerial::write() was called for each char in the string "Hello, world?" (when is defined other pin than 1). This would be:

Serial.print("SoftwareSerial::write()");
Serial.println(b);

in line 445 SoftwareSerial.ccp.

Any idea of what kind of problem is that I am dealing with? Thanks in advance.

What pins are you connecting SoftwareSerial to?

Your problem is that you don't understand what software serial is doing for you. You are mixing it up with the hardware serial connected to pins 0 & 1. With software serial you need extra hardware to see the output in the serial monitor. You need another USB to TTL adaptor.

Thank you both for your fast answers. I think now I get it: the default hardware serial connection uses the pins 0 and 1. Therefore I cannot use it to read data from a SoftwareSerial instance. Now makes sense, that I can interact with a bluetooth via AT commands whenever Serial.begin() is not called. By the way, this post is worth reading. http://arduino.cc/hu/Tutorial/SoftwareSerial. Greetings

Hi Nick, I have used software serial port using 2,3 pins to communicate to and from laptop.Using TTL to RS232 converter able to communicate with laptop.But while writing data from serial port, some junk data is seen.

The same program is working very fine using USB serial port.Please help.