Small ring binders like these are really convenient for efficiently storing components on cut tape. What's not so convenient is manually cutting and pasting the labels from DigiKey pouches or manually copying part numbers.
To reduce the ever-growing pile of DigiKey pouches I needed an efficient way to generate labels to apply to the sample book pages.
video.mp4
Every product shipped from DigiKey comes with a Data Matrix code that contains the contents of the product label. The Cognex Barcode Scanner app scans Data Matrix code with ease (compared to the ZXing app) and supports automatically opening an URL after a successful scan.
A flask app running on my laptop then uses DigiKey's API for converting the barcode to MPN and description.
After confirming and optionally making edits it then prints the label on a Phomemo D30 label printer via bluetooth.
These scripts piggy-back on the DigiKey API integration in Horizon EDA, so set it up first.
Then create the config.py
like this:
printer_mac = '00:00:00:00:00:00'
Then start the flask app: flask --app server run -p 8337 -h 0.0.0.0
Configure the barcode scanner to point to the computer running the flask app.
Directly connecting to the printer via bluetooth has less ways to wrong than using cups for example.
I know, I suck at webdev.
I can't be bothered to learn how to make Android Apps.