Arduino Barcode Scanner

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
zoseran
 
Posts: 1
Joined: Mon Sep 30, 2013 12:47 am

Arduino Barcode Scanner

Post by zoseran »

Hi I was wondering what parts would I need to build a arduino circuit that is able to scan items and relay that information to a screen like a shield? Please help me!

Thanks!

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: Arduino Barcode Scanner

Post by adafruit_support_rick »

We have a barcode scanner you can connect to your arduino

PS/2 barcode scanner:
http://www.adafruit.com/products/1202

PS/2 adapter cable:
http://www.adafruit.com/products/804

Use the PJRC PS/2 Keyboard Library to read the scanner:
http://www.pjrc.com/teensy/td_libs_PS2Keyboard.html

sofakingpretty
 
Posts: 1
Joined: Wed Oct 02, 2013 6:59 pm

Re: Arduino Barcode Scanner

Post by sofakingpretty »

Hello,

I am trying to figure out how to work this barcode scanner. I have the PS/2 Adapter. I connected Green to 5V, Black to Ground. What colors do I connect to pins 2 and 3 on the Arduino UNO? I'm very confused at the moment. :?

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: Arduino Barcode Scanner

Post by adafruit_support_rick »

Are you using the example program from the PJRC site? Change that to use pins 2 and 3

Code: Select all

#include <PS2Keyboard.h>

const int DataPin = 2;
const int IRQpin =  3;

PS2Keyboard keyboard;

void setup() {
...etc...
On the PS/2 adapter product page, the wires are listed as follows:
Green wire is +5V
Black wire is Ground
Brown wire is Data
Yellow wire is Clock
Data connects to DataPin, and Clock connects to IRQPin (I know, it probably should be called "ClockPin", but it has to be a pin that can generate an interrupt, so "IRQPin")

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino”