Skip to content

A Thermal Printer library using ArduinoBLE and Adafruit GFX

License

Notifications You must be signed in to change notification settings

MYCAMEL222/AbleTP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AbleTP

A Thermal Printer library using ArduinoBLE and Adafruit GFX to control MPTII style printers.

Testing was done using a GOOJPRT PT-210. It runs the MPTII firmware.

Untitled design

ArduinoBLE allows multiple methods of scanning to find the proper printer (MAC, Name and UUID). If you need to find printer info like a scannable printer name or MAC address, you can run a test print and that info will be printed out (most printers will do this).

To run a test print:

  1. Make sure printer power is OFF.
  2. Hold down the form feed button.
  3. Press the power button to ON.
  4. Printer should automatically print a test page.

To find printer UUID, you can use a BLE scanner app like…

https://play.google.com/store/apps/details?id=no.nordicsemi.android.mcp&pcampaignid=web_share

You may be able to use these sketches with other Thermal Printers by changing the UUID settings to match your printer. That has not been tested.

*** The example below creates a simple data logger. It will print out data (every 5~6 seconds) to the printer as long as the printer BLE is connected. If the printer disconnects the data restart after reconnect (any data while disconnected will be lost). If the micro-controller restarts, the entire sketch restarts. ***

rotdatalogger

*** The example below draws Adafruit_GFX graphics to the printer. It uses the controllers memory as a buffer (canvas). Once the image is drawn to the canvas, the canvas is printed to the printer via BLE. ***

rotgfx

*** The example below prints out images and custom text ***

rotimages

*** The example below prints the printer's built in barcode functions. ***

rotbarcodes

*** The example below prints many of the normal ESC/POS commands to the connected BLE printer. ***

rotnormal_commands

About

A Thermal Printer library using ArduinoBLE and Adafruit GFX

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages