Upgrade to Pro — share decks privately, control downloads, hide ads and more …

"Building a label printer using Python, Arduino...

Pycon ZA
October 09, 2020

"Building a label printer using Python, Arduino, duct tape and paperclips" by Johan Beyers

A Lightning Talk at PyCon ZA 2020

Pycon ZA

October 09, 2020
Tweet

More Decks by Pycon ZA

Other Decks in Programming

Transcript

  1. Building a label printer using Python, Arduino, duct tape and

    paperclips. And: • Hot glue • Cable ties • A washing peg • A ruler • A hobby servo • Skateboard bearings • Polymorph (the plastic, not the company) • Sandpaper • A pencil • A Coke can • A series of tubes • Plus various cannibalised bits from my garage
  2. Hackathon • Half a weekend • Build something useful •

    Or not • One step at a time • TLAR design methodology I had an idea….
  3. The physical build Masking tape roll on a threaded rod,

    turning slowly. One rotation moves it 1mm sideways (spiral). Detect a starting point (Coke can, paperclips). Raise/lower a pen to create pixels.
  4. Software Laptop running a Python script: • Convert text to

    image • Convert image to list of lists of colour values • Send timed up/down commands to Arduino Arduino is just a dumb controller: • Drive the motor • Send a start position trigger to the laptop • Receive up/down and move the pen
  5. Results: • 11 hours zero to Hello World • 48

    lines of Python code • 68 lines of Arduino code • 0 test coverage • 40 labels printed to date • 8 minutes per label • 1 lightning talk Definitely worth it, would do again.
  6. http:/ /johan.beyers.co.za Talk to me about: • Python • Takealot

    (We’re hiring!) • Maker evenings (on hold) Or some other projects: • 3D printer • Dog speedometer • Simple drawing machine • Perpetual Pendulum Wave • Electric bicycle