Giter VIP home page Giter VIP logo

py-thermal-printer's Introduction

Python Thermal Printer Library

Thermal printing library that controls the "micro panel thermal printer" sold in shops like Adafruit and Sparkfun (e.g. http://www.adafruit.com/products/597). Mostly ported from Ladyada's Arduino library (https://github.com/adafruit/Adafruit-Thermal-Printer-Library) to run on BeagleBone and Raspberry Pi.

If on BeagleBone or similar device, remember to set the mux settings or change the UART you are using. To enable the defaults for example:

# MUX SETTINGS (Ängström 2012.05 on BeagleBone) 
echo 1 > /sys/kernel/debug/omap_mux/spi0_sclk
echo 1 > /sys/kernel/debug/omap_mux/spi0_d0 

If on a Raspberry Pi and using the GPIO UART pins, remember to use a level shifter between the printer (5V) and the RPi (3V3).

For more detailed step-by-step instructions see this tutorial.

UART can be changed by passing the device path to the constructor: p = printer.ThermalPrinter(serialport="/dev/ttyUSB0")

Thanks to Matt Richardson for the initial pointers on controlling the device via Python.

Author: Lauri Kainulainen

Contributors: Jonathan Harlap Owen Mundy bodiedoo

Licensed under the MIT license

py-thermal-printer's People

Contributors

jharlap avatar luopio avatar omundy avatar

Watchers

James Cloos avatar Jocelyn Kerbourc'h avatar

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.