How to use a barcode scanner

So I wanted to make a barcode scanner for my project and I don't really know how to code that well and hoped that some of you might be able to help me. First of all, I don't know what type of barcode scanner I should choose. The barcode is supposed to read a barcode on abottle and when detected, activate a relay which power a motor. The barcode just have to detect the barcode and be somewhat compact if possible. I have an arduino uno and some other electrical components and wires. I would rather not use to much money on this project however, so try not make the parts to expensive. I would really appreciate any help given.

I bet Mr. Google can help you determine the type of bar code you are wanting to scan. And from that information, you can pick a scanner that you can use. And perhaps even some sample code to get you started.

Paul

The Cuecat should work, available used on eBay.

Read the output with Arduino using the PC keyboard library (worked fine for me).

#include <PS2Keyboard.h>
//
// reads CueCat bar codes. This version intended for modified PSII type CueCat
// Cut cable. Wire connections to Arduino:
// Brown = +5V, bare = GND, Yellow = CLK = pin 3, Orange = DATA = pin 6
// http://www.instructables.com/id/Arduino-and-CueCat-barcode-scanner/
// http://www.cexx.org/cuecat.htm for modifications