Skip to content
The MicroPython port of Python Thermal Printer by Adafruit
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
gfx Add test images and update printertest Dec 19, 2017
.gitignore Replace time with utime and fix timeouts for .bmp printing Dec 20, 2017

MicroPython Thermal Printer

This is the MicroPython port of Python Thermal Printer by Adafruit, available elsewhere on GitHub.

Read the full story at

The summary of changes

  1. Removed Python 2.x code
  2. Removed writeToStdout()
  3. Replaced Serial with machine.UART
  4. Removed support for pre-2.68 firmware
  5. Removed image printing method, because it depended on Python Imaging Library
  6. Disabled calls to wake() and reset() at initialization
  7. Fixes to sleepAfter() and wake()


  • printBitmapFromFile() - allows for printing the bitmap from file on disk, instead of reading it from array of bytes like printBitmap() does.
  • printBMPImage() - allows for printing the actual .bmp image. Supports 1-bit Windows BMP format only, up to 384px wide.
  • heat dots, heat time and heat interval settings are parametrized in the initializer to fine tune printer output.


See for usage example.


So far I tested it only with LoPy version 1. Works fine, besides printing large bitmaps that required too much memory for the LoPy (for the bitmap provided with - hence printBitmapFromFile().

You can’t perform that action at this time.