Planning the UPC Reader

Mar 12, 2020 • Dylan Colli

This post is going to discuss how I want to go about implementing the UPC reader portion of ingreedyents.

I envision that I will eventually have a UPC reader hooked up to the computer running ingreedyents and have that feed data to the application so that we can then perform the necessary HTTPS GET requests for the ingredient macros, calorie information, name, etc.

Getting Lost in the Weeds

I’ve so far looked at some background information on USBs and how to emulate a USB virtual port, and boy does that look complicated. I quickly got in over my head and went into a rabbit hole of trying to decipher the difference between USB and serial ports.

Voila

Long story short, I took a break and searched for some barcode readers to get an idea of the type of software that I could be using.

I stumbled across the NADAMOO Wireless 1D Barcode Scanner on Amazon and it states that the device can act as an USB HID (human interface device). This essentially means that it can function as a keyboard, entering alphanumeric characters whenever the device scans something. I believe this will work perfectly and am going to order one tonight!

I imagine this being implemented with a GUI on one thread and the capture of all UPCs from the device on another thread. That way I can interact with the device while I scan items.

This is going to be fun!