Hi, everyone. I been looking for information in the forum and google with no sucess. The barcode scanner manual says that communication is TTL-RS232 because the vcc is 5v to feed the device, so i connected to arduino directly without max232 or max3232(of course i tried too, but nothing happen, only direct connection throw me data). The matter is that the data that i recieve i don't know how interpret it, i'm read only code 39... Here is the code, it's a super simple code:
#include <SoftwareSerial.h>
SoftwareSerial scanner(10,11);
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
scanner.begin(9600);
}
void loop() {
if(scanner.available()){
Serial.println(scanner.read());
}
}
I connected the pins like this:
RS232 Arduino
2(RX)--------->10(RX)
3(TX)--------->11(TX)
5(GND)------->GND
When i scan a barcode "215774", the monitor serial shows:
179
86
22
22
118
6
If i scan a barcode "170264", the monitor serial shows:
103
100
182
54
118
6
How i have to do for get the same number that i scanned? or i ignored something?
I would appreciate so much your help, thank you!