From cdd9d77a253650b044f65546010c5a85f04de0bd Mon Sep 17 00:00:00 2001 From: Jacob McDonnell Date: Thu, 29 Sep 2022 20:47:45 -0400 Subject: Final Test --- README.md | 1 + main.py | 6 ++---- requirements.txt | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 01d8c1b..7468a79 100644 --- a/README.md +++ b/README.md @@ -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) diff --git a/main.py b/main.py index 34fdd35..b3abe87 100644 --- a/main.py +++ b/main.py @@ -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 -- cgit v1.2.3