• 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:

Interfacing barcode scanner with arduino using RS232

Not open for further replies.
Jul 20, 2016
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:

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

void setup()

void loop()
if (mySerial.available())

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.


Not open for further replies.