QR Code on Raspberry Pi

Scanning QR code on Raspberry pi using ZBar.

We can use our Webcam to scan QR Codes with the help of a tool such as zbar tools. To use zbar tools, all you need to do is install it by typing:

sudo apt-get zbar-tools

Now verify how your webcam shows up by typing:

ls /dev/video*. You should get something like: /dev/video0. Now type the following command, replacing 0 with the number your video webcam showed at, and the zbarcam tool will show up

zbarcam /dev/video0

Provided that the camera is in focus, it should at this point be able to scan qr codes quite easily. Try to point it out at different qr codes and you should get the output in the terminal. You can check this on codes generated on the screen or on printed qr codes.

To generate a qr code, you can use a free online tool. http://goqr.me/ is a good one to start with. You can select what type of output it gives: a message, a website, or any other option.

https://youtu.be/17Wy_UYaSJY

Now, You can point the web camera to the qr code and, once it is in focus, it will read it and will display the output in the terminal.

Source: QR Code on Raspberry Pi


About The Author

Muhammad Bilal

I am highly skilled and motivated individual with a Master's degree in Computer Science. I have extensive experience in technical writing and a deep understanding of SEO practices.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top