• Effective immediately we will be deleting, without notice, any negative threads or posts that deal with the use of encryption and streaming of scanner audio.

    We've noticed a huge increase in rants and negative posts that revolve around agencies going to encryption due to the broadcasting of scanner audio on the internet. It's now worn out and continues to be the same recycled rants. These rants hijack the threads and derail the conversation. They no longer have a place anywhere on this forum other than in the designated threads in the Rants forum in the Tavern.

    If you violate these guidelines your post will be deleted without notice and an infraction will be issued. We are not against discussion of this issue. You just need to do it in the right place. For example:
    https://forums.radioreference.com/rants/224104-official-thread-live-audio-feeds-scanners-wait-encryption.html

Interfacing barcode scanner with arduino using RS232

Status
Not open for further replies.
Joined
Jul 20, 2016
Messages
2
#1
I want to connect a barcode scanner with Arduino. I used (MAX232.) to convert the levels. I have taken only 3 pins: 2(RX), 3(TX) and 5(GND) from the DB9 cable and given them to pins of MAX232 as shown in the figure:
http://forums.radioreference.com/attachment.php?attachmentid=56999&stc=1&d=1475832107

This is the code written in Arduino:
#include <SoftwareSerial.h>
SoftwareSerial mySerial(6, 7); // RX, TX

void setup()
{
Serial.begin(9600);
pinMode(6,INPUT);
pinMode(7,OUTPUT);
mySerial.begin(9600);
}

void loop()
{
if (mySerial.available())
Serial.println(mySerial.read());
}

When I move the TX pin on DB9, I get readings like 255, 240, 189, etc., i.e. random numbers. However, when I scan the barcode, I am not getting any output. I also checked the output of TX pins on an oscilloscope, which showed symmetric waves for a very short amount of time. Again, when the pin 12 of MAX232 (TTL output) was connected to the oscilloscope, no reading was observed.
 

Attachments

Status
Not open for further replies.
Top