I would like to write an app where I have an external QR or Bar Code Scanner plugged into a USB port so I could read QR codes into a textbook in Xojo. It would be like an attendance type app in which the user would scan a code and the contents would go into a textbox. The QR code would simply be a first and last name, nothing fancy.
Is there a way I can do this with Xojo? Can do use the Serial Control to do this?
Most manufacturers of scanners offer units that emulate a keyboard or serial device. The serial device would just show-up on a port. You would use the Serial Control in Xojo to interface with. Once you initialized the port you could use the DataAvailable and ReadAll method to get the data from the buffer.
As Christian mentioned the easiest way is to use a scanner that emulates a keyboard. In that case the user would just scan the code when they are on the text field that you want to capture the data into, it literally is just like typing on the keyboard.
Thank you Christian and Joseph. I appreciate the advice. I actually downloaded an iPhone app that works great, so I am up and running. Thank you so much for taking the time to help. I really appreciate it.
generating a EAN or SSCC barcode isn’t that hard if you have the right manuals from your local GS1.
However generating a QR code to put on your attendance card is a real bugger. I find it easier to just send this
and wait for the response. Works every time and they are quite fast. Just create a simple program to loop through a list and save the returned image to disk. You could even name the image as the attendees full name. Check it with the scanner you will use as the size you can use for the QR code depends a lot on the scanner you use (see below).
if you go to the site qrfree.kaywa.com you will see the options they have and they give you a link, the QR code can be various sizes and have various duties. For you a text QR code would be the best , you can have up to 1024 characters in a normal QR code so you could go sick if required.
As for reading of them, the above from the lads is correct, use a symbol or data-logic scanner which only does keyboard emulation. You get them on EBay from China for about 20-30 $ each any Laser Barcode Scanner would do the job. However these will only do limited names and you would have you use a Code-39 extended barcode, which will limit you to a few dozen characters, not impossible however much easier with QR codes.
QR scanners cost a bit more but do exactly the same thing. Something like a Metrologic MS1690 costs about $100 however they are USB and bullet proof if you drop them.
Hope this helps
Damon
PS I have no personal or commercial interest in qrfree.kaywa.com, I just use them and find it simple to use.
[quote=16813:@James Redway]Thank you Christian and Joseph. I appreciate the advice. I actually downloaded an iPhone app that works great, so I am up and running. Thank you so much for taking the time to help. I really appreciate it.