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

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

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

More Decks by Pycon ZA

Other Decks in Programming


  1. Building a label printer using Python, Arduino,
    duct tape and paperclips.
    ● 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

    View Slide

  2. Hackathon
    ● Half a weekend
    ● Build something useful
    ● Or not
    ● One step at a time
    ● TLAR design methodology
    I had an idea….

    View Slide

  3. The physical build
    Masking tape roll on a threaded rod, turning
    One rotation moves it 1mm sideways (spiral).
    Detect a starting point (Coke can, paperclips).
    Raise/lower a pen to create pixels.

    View Slide

  4. Software
    Laptop running a Python script:
    ● Convert text to image
    ● Convert image to list of lists of colour
    ● 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

    View Slide

  5. Python: Getting the image

    View Slide

  6. Python: Control

    View Slide

  7. 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

    View Slide

  8. http:/
    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

    View Slide

  9. View Slide

  10. View Slide

  11. View Slide

  12. View Slide

  13. View Slide

  14. View Slide