Hello,
I have a problem reading from a barcode scanner from any other pin then the rx(0)
I am getting the required code and everything works great with the normal Rx pin. but once i use the Newsoftserial library with any other pin (tried with 2 8 and 9)i get a weird output: 45b?D$F4T$6?þ instead of getting 451004002400035238
does anyone know what the real problem is?
is it from the library itself?
here are some more information:
I am using a max233cpp chip between the barcode and the arduino Duemilanove
all the connections seems to work fine with the rx pin of the arduino
my barcode reader has a baud rate of 9600
and here is the sample program that i am using with software serial 11 beta
#include <SoftwareSerial.h>
SoftwareSerial mySerial(9, 4);
void setup()
{
Serial.begin(9600);
Serial.println("Please Work!");
// set the data rate for the SoftwareSerial port
mySerial.begin(9600);
}
void loop() // run over and over
{
if (mySerial.available())
Serial.print((char)mySerial.read(), BYTE);
if (Serial.available())
Serial.print((char)Serial.read());
}
Thanks for any help of guidance