To download NI software, including the products shown below, visit ni.com/downloads.
Overview
This VI demonstrates how to automatically generate offline QR Code based on the user's input.
Description
The QR Code Generator is based on the source code provided by ZXing Team.
https://github.com/zxing/zxing/
Credits to Thonky for providing detailed concept behind QR Code Encoding and Error Correction.
You can refer to the link below for more information.
http://www.thonky.com/qr-code-tutorial/
en.wikipedia.org/wiki/QR_code
Requirements
Steps to Implement or Execute Code
(Side note: If Automatic is selected, it will only check if the string that you used is numeric, alphanumeric or plain text)
Additional Information or References
VI Snippet
**This document has been updated to meet the current required format for the NI Code Exchange.**
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.
Thanks for this VI.
But I have a problem, When using my cellphone to read the QC I have got Unknow QR Code. Why? How to fix it.
Hi Hong,
Thanks for the input.
May I know what is the mobile app that you're using to scan and read the QC?
I've used the Barcode Scanner app by Zxing Team and I managed to read your QC from your attached image.
Try use that app and see if that works.
https://play.google.com/store/apps/details?id=com.google.zxing.client.android&hl=en
Thanks.
ongeelim, your vi's also work perfectly (I did test "Automatic" and "Numeric") with
https://itunes.apple.com/us/app/easy-scanner/id546599922?mt=8
which I use on a Nokia Lumia Windowsphone.
Great work! What is the licence of your code?
Nice work. I noticed that the right edge and bottom edge in the saved image was cropped compared with the previous image in the screen. Is this normal?
In addition, it seems that only jpg file format is used even though bmp or png is selected.
Thanks, Joseph
Hi ongeelim,
Nice job! I have the same question as "m_m_m" above re: license. Under what license are you releasing this? (It looks like the Zxing library is released under the Apache license.)
Re: feedback on the code: I'm not familiar with the QR spec but I think you want to change the feedback node in "QR Code Encoder" from uninitialized to initialized. (You've got a loop, so just use a regular shift register.) Otherwise, you're storing state between calls. I assume it always hit the "true" case when i=0, but no need to run the risk of unintended side-effects by using a static var.
Have a great day!
Rob Calhoun
Hi,
I am looking for a QR Code generator that will place an image in the centre of the QR Code.
Any suggestions?