No description
Find a file
2023-05-16 07:48:29 -07:00
gfx Finished code and graphics 2013-02-13 18:16:31 -08:00
.gitignore Add .dccache to .gitignore for Snyk 2021-12-26 23:40:41 -07:00
Adafruit_Thermal.py Add files via upload 2022-01-15 19:09:28 -05:00
calibrate.py changed to /dev/serial0 for compatibility 2017-02-20 13:50:27 -05:00
datetime.py Improve datetime.py script and README.md documentation with comments and tips from linting 2021-12-26 23:42:10 -07:00
forecast.py Add files via upload 2022-01-15 19:09:28 -05:00
main.py Add files via upload 2022-01-15 19:09:28 -05:00
printertest.py Fix typos 2017-04-26 16:08:12 -07:00
README.md Update README.md 2023-05-16 07:48:29 -07:00
sudoku-gfx.py Add files via upload 2022-01-15 19:09:28 -05:00
sudoku-txt.py changed to /dev/serial0 for compatibility 2017-02-20 13:50:27 -05:00
timetemp.py Changed timetemp to display with openweathermap 2020-09-07 17:14:15 -07:00
twitter.py Update twitter.py 2019-03-06 05:57:24 +05:30

!!! NOTE !!!

THIS REPOSITORY IS ARCHIVED AND IS NO LONGER SUPPORTED OR MAINTAINED

Python-Thermal-Printer Module

Python3 port of the original Adafruit Python-Thermal-Printer library.

Getting Started

Install Raspbian Buster and Wire the printer according to this. I powered the printer with the GPIO pins as well.

Run a test to see if the printer is working by punching in these commands into the terminal.

stty -F /dev/serial0 19200
echo -e "This is a test.\\n\\n\\n" > /dev/serial0

Installing

Update the system and install prerequisites.

sudo apt-get update
sudo apt-get install git cups wiringpi build-essential libcups2-dev libcupsimage2-dev python3-serial python-pil python-unidecode

Install the printer driver. Don't worry about the warnings that g++ gives.

git clone https://github.com/adafruit/zj-58
cd zj-58
make
sudo ./install

Make the printer the default printer. This is useful if you are going to be doing other things with it.

sudo lpadmin -p ZJ-58 -E -v serial:/dev/serial0?baud=19200 -m zjiang/ZJ-58.ppd
sudo lpoptions -d ZJ-58

Restart the system. Clone this repository and try to run printertest.py.

git clone https://github.com/galacticfan/Python-Thermal-Printer/
cd Python-Thermal-Printer
python3 printertest.py

Let me know if you have any issues.