USB Barcode Scanner (Raspberry Pi)

5,170

16

4

Posted

Introduction: 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

RPI 3 – https://goo.gl/CdVNoH

4 Amp Power Adapter – https://goo.gl/js4Uc7

16GB Micro SD – https://goo.gl/FDqZal

120 pcs jumper cable: https://goo.gl/spWoaC

USB Barcode Scanner: https://goo.gl/KfKXLq

Step 2: 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 https://upcdatabase.org/ and create a free account and take note of api key

6. Edit line 6 of barcode.py and enter your api key

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

Step 3: Code

Dependencies:

"pip install requests"

Step 4: Additional Info

Share

Recommendations

  • Epilog Challenge 9

    Epilog Challenge 9
  • Paper Contest 2018

    Paper Contest 2018
  • Sew Warm Contest 2018

    Sew Warm Contest 2018
user

We have a be nice policy.
Please be positive and constructive.

Tips

Questions

It shows an error called
No such file/directory dev/hidraw0 exists
how should I fix it?

Comments

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!!