Introduction: USB Barcode Scanner (Raspberry Pi)

Picture of USB Barcode Scanner (Raspberry Pi)

Basic tutorial of how to setup a USB barcode scanner with the Raspberry Pi.

*Note: Due to API changes, python script needs modification to interact with the New API

Step 1: Parts

Picture of Parts

RPI 3 –

4 Amp Power Adapter –

16GB Micro SD –

120 pcs jumper cable:

USB Barcode Scanner:

Step 2: Setup

Picture of Setup

1. Plug in USB Barcode Scanner to Raspberry Pi

2. Boot Pi and open terminal

Type "sudo raspi-config"

3. Go to interfacing options and enable "Serial"

4. Install dependencies

Type "pip install requests"

5. Navigate to and create a free account and take note of api key

6. Edit line 6 of and enter your api key

7. Type "sudo python" to run script (press ctrl+c to exit script)

Step 3: Code

Picture of Code


"pip install requests"

Step 4: Additional Info

Picture of Additional Info


bivav (author)2017-10-04

Hi there... I just wanted to know if it is possible to buy any bar code scanner to work with this code.. can we?

Thank you in advance!!

About This Instructable




Bio: the Raspberry Pi is Awesome!
More by piddlerintheroot:Accelerometer (Raspberry Pi)Flame Sensor (Raspberry Pi)Soil Moisture Sensor (Raspberry Pi)
Add instructable to: