summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md1
-rw-r--r--main.py6
-rw-r--r--requirements.txt2
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