USB Barcode Scanner and USB

Hello All,

I'm new to using the Arduino and I am trying to use my Arduino Mega with a USB Barcode scanner. My project is to scan a barcode and if it is the correct barcode turn on a LED light, but if it's wrong then don't do anything.

I'm trying to figure out how to connect my USB Barcode Scanner to my Arduino as there are no USB A ports. Is there a way for me to connect the barcode scanner to my arduino possible by buying a usb shield or some other module to help with the connection or do I have to get a new barcode scanner such as a RS232 barcode scanner.

Any help with this would be greatly appreciated, thank you!!

You need an USB master to connect USB slaves like the Mega or your scanner. An USB shield may help, but it's easier to connect an RS232 or SPI scanner to your Mega.

If you connect the barcode scanner to the PC then does it show up as a HID keyboard to inject the barcode number into a document or does it have proprietary software & drivers. If it's the latter then probably changing the scanner as DrDiettrich suggests is the best option but if it behaves as a keyboard then something like this may work.