SoftwareSerial resetting problem with Arduino uno


i have configured softwareserial port on uno (pin 2 rx , pin 3 tx) , connected usb port of pc through usb serial converter based on pl2303. connected build in usb port of uno same pc. have opened 2 terminal programs in pc connected both ports.

my sketch listens both hardware , software ports , if received on port reflected other port.

now if send uno's hardware port correct reflection uno's softwareserial port. if send character softwareserial port uno seems resets (i receives "hello" response both ports).

i tried experiment various baud rates , pin numbers softwareserial port. tried external power supply uno. still same resetting issue.


code: [select]
softwareserial softport(2, 3);
void setup() 
{
serial.begin(9600);
while (!serial) {
}
softport.begin(9600);

softport.write("hello");
serial.write("hello");
}

void loop()
{
softport.listen();
if (softport.available() ) {
serial.write("3"); //this line never executed
serial.write(softport.read());
}
if (serial.available() ){
int value = serial.read();
softport.write(value);
serial.write(value);
}
delay(10);
}

remove softport.listen() call.


Arduino Forum > Using Arduino > Networking, Protocols, and Devices (Moderator: fabioc84) > SoftwareSerial resetting problem with Arduino uno


arduino

Comments

Popular posts from this blog

Error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode - Raspberry Pi Forums

class MPU6050 has no member named begin

missing filename after '-o'