Code Monkey home page Code Monkey logo

dk-labels's Introduction

DigiKey label generator

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

Implementation

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.

Form with MPN, description and DK PN

After confirming and optionally making edits it then prints the label on a Phomemo D30 label printer via bluetooth.

Setup

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.

Anticipated questions

Why directly talk to the printer?

Directly connecting to the printer via bluetooth has less ways to wrong than using cups for example.

The web app looks so bland

I know, I suck at webdev.

Why not run it all on the phone?

I can't be bothered to learn how to make Android Apps.

dk-labels's People

Contributors

carrotindustries avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

vitmain

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.