Vai al contenuto

Raspberry PI and Thermal printer

  • di

[:en] Using raspberry to print shopping list or similar to a thermal printer

The idea came from the top of my head just after I connected the thermal printer to my raspberry following these instructions (https://learn.adafruit.com/networked-thermal-printer-using-cups-and-raspberry-pi?view=all) and after I tried this project https://github.com/LukePrior/Raspberry-Pi-Thermal-Printer

The project is simple:

  1. Raspberry Pi + Thermal printer
  2. Webpage to manage the shopping list of the family

We start from the bullet 2 (see the link above for the setup of the thermal printer)

We need 2 services a) The printer manager that opens a socket and wait for a connection (file printerManager.py) b) The service who manage the list on the webpage and send to the first service (file server.py) (or setup it with a standar Apache, ngnix, …. if already you have one)

…and the webpage (index.html)

Go to the page https://github.com/iholmes83/RaspberryThermal?tab=readme-ov-file and download these files:

index.html

printerManager.py

server.py

If you decide you can also use the html in a separate web server, for instance you can also modify the server.py file as you need. You definitely should modify the IP address according to your needs.

Install all the libraries needed in for the python using the command “sudo pip instal <name of the module”

You can try to execute all as “temporary” launching in two different terminals “python3 printerManager.py” and “python3 server.py” or install them as services (see the GitHub link).

Then open the webpage using a browser and start to test it! [:]

Lascia un commento