-
Notifications
You must be signed in to change notification settings - Fork 146
Implement compatibility to Python3 and Raspberry Pi3 #22
base: master
Are you sure you want to change the base?
Implement compatibility to Python3 and Raspberry Pi3 #22
Conversation
- Change default terminal to ttyS0 for Raspberry Pi 3 - Bug fix of write function to estimate the correct count of characters - Use of ord() to determine the correct byte code for a character - Encode character to convert it to a byte array for terminal output
Verification: printertest.py produces correct output - PASSED
Hi, is there something wrong with my pull request? Could you please provide me a feedback? I opened the request 6 months ago but didn't receive any feedback up to now. Regards, Dennis |
thanks to @gasperphoenix for the python3 edits - I merged them into my local copy and have a working system |
@bradanlane could you share your merged repo? I am having troubles making raspberry 3 to print - it output a lot of white paper and then has some issues starting printing. |
I started which what was likely a fork of a copy of a fork etc. I merged @gasperphoenix changes into what I was working with. (I also found a few bugs along the way). You can find my version at: https://gitlab.com/bradanlane/hawkeyepi |
Could you please check why the inverse text (black background and white text) doesn't work? |
Could you please be a bit more specific? The inverse text worked in the past with python2.7 and with the serial interface "/dev/serial0", but since I changed it to "/dev/ttyS0" to be able to support python3, it doesn't work anymore. Everything else works perfectly when I run the printertest.py |
yah to thru that guide to use the circuitpython library and examples |
Hi, I have just ported the below Library files to run with my Rasperry Pi 3 project using Python3. I verified the changes by running printertest.py with Python 3 and checking that the same output is produced as using Python 2.
For supporting Raspberry Pi 3 the terminal needs to be changed from ttyAMA0 to ttyS0.
For supporting Python3 some usages of string elements needed to be reworked.