Introduction: BarcodeScanner Using Arduino
I spent time trying to gather information to make this project and it was successfull .As a result ,I decided to share it to make it easy for everyone to find all the project in one place.
Step 1: Arduino Connection
We are tying to apply this sketch . So the arduino connection will be as the shown picture .
Then by
taking 4 external wires from :
pin 29 (green) //Data
pin 30 (Yellow) //Clock
5V (red) //+ve
ground (blue) //- ve
** the handwritten sketch is copied from :
Step 2: Connect to Barcode Scanner
We will look at the terminal with wires(in the above picture) of the connector as male data pins .
Connecting the 4 taken wires(from previous step) to the wires of that connector (data with data , ground with ground , clock with clock and power with power ).
** connection is by spinning each wire on the corresponding one .
Now connect the socket of the connector to the ps2 barcode scanner .
Step 3: The Code
Now it is ready to scan barcodes :)
7 Comments
5 years ago
Hi my barcode scaner got 5 wires how can i conect them, its red black blue green white
Reply 5 years ago
Sorry, I do not know whether the colors could indicate something or not.
If you have the scanner's manual could you check it ?
6 years ago
Hi!
Is the scanner supposed to be in serial or keyboard wedge output mode? I cannot get any serial output. Please help :)
I got this btw: http://www.yhdaa.com/English/Product/479608159.html
6 years ago
hai... i'm very impressed with your project.. I try to search for ps/2 barcode scanner but I could not found in. can you share the link where did you buy the ps/2
Reply 6 years ago
Actually, I have not bought it it belongs to my professor . Sorry , I wished I could help :)
6 years ago
This is so cool! What do you plan on doing with the barcode once you scan it into the computer?
Reply 6 years ago
The scanned barcode is mapped to a product , then products are printed to a receipt . ( Simulation for markets' shopping cart )