diff options
| author | Jacob McDonnell <jacob@simplelittledream.com> | 2022-09-29 20:47:45 -0400 |
|---|---|---|
| committer | Jacob McDonnell <jacob@simplelittledream.com> | 2022-09-29 20:47:45 -0400 |
| commit | cdd9d77a253650b044f65546010c5a85f04de0bd (patch) | |
| tree | cfadd8f7aa6c2e74e91c58194f14b2cec39aaa57 | |
| parent | ed317860178fe187a97fddda3d7b98fa5412a0b2 (diff) | |
Final Test
| -rw-r--r-- | README.md | 1 | ||||
| -rw-r--r-- | main.py | 6 | ||||
| -rw-r--r-- | requirements.txt | 2 |
3 files changed, 4 insertions, 5 deletions
@@ -17,6 +17,7 @@ interface with the - Test print page with ip address - Web interface for settings - Settings print out with qr code to ip address +- Fix the Phantom j ## Parts - [Adafruit Thermal Printer](https://www.adafruit.com/product/600) @@ -9,11 +9,10 @@ from time import sleep from Adafruit_Thermal import * from textwrap import fill from ipqr import getQrCode -from PIL import Image name = general["name"] today = datetime.date.today().strftime("%A %m-%d-%Y") -printer = Adafruit_Thermal("/dev/ttyS0", 19200, timeout=5) +printer = Adafruit_Thermal("/dev/serial0", 19200, timeout=5) output = ["The Morning Paper:", f"Good Morning {name}, Today is {today}"] @@ -40,9 +39,8 @@ def printSettingsPage(): printer.println("Settings") try: getQrCode() - qr = Image.open(r"ipqr.png") printer.println(fill("Scan the QR Code below to access settings", lineWidth)) - printer.printImage(qr) + printer.printImage("ipqr.png") except: printer.println("No Network Connection") diff --git a/requirements.txt b/requirements.txt index be6cf5a..dbe1d9a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,4 +5,4 @@ drawing~=0.0.3 setuptools~=56.0.0 Adafruit-Thermal recurring-ical-events -Pillow
\ No newline at end of file +pypng
\ No newline at end of file |
