Skip to content

Commit

Permalink
Add docs for simulated LCD mode
Browse files Browse the repository at this point in the history
  • Loading branch information
mathoudebine committed Sep 8, 2022
1 parent 37b0ad8 commit 9f4e134
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ display:
# Warning: screen can get very hot at high brightness!
BRIGHTNESS: 20

# Display revision: A or B (for "flagship" version, use B)
# Display revision: A or B (for "flagship" version, use B) or SIMU for simulated LCD (image written in screencap.png)
# To identify your revision: https://github.com/mathoudebine/turing-smart-screen-python/wiki/Hardware-revisions
REVISION: A
Empty file modified res/fonts/generale-mono/LICENSE.txt
100755 → 100644
Empty file.
7 changes: 6 additions & 1 deletion simple-program.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@
# Import only the modules for LCD communication
from library.lcd_comm_rev_a import LcdCommRevA, Orientation
from library.lcd_comm_rev_b import LcdCommRevB
from library.lcd_simulated import LcdSimulated
from library.log import logger

# Set your COM port e.g. COM3 for Windows, /dev/ttyACM0 for Linux, etc. or "AUTO" for auto-discovery
# COM_PORT = "/dev/ttyACM0"
# COM_PORT = "COM5"
COM_PORT = "AUTO"

# Display revision: A or B (for "flagship" version, use B)
# Display revision: A or B (for "flagship" version, use B) or SIMU for simulated LCD (image written in screencap.png)
# To identify your revision: https://github.com/mathoudebine/turing-smart-screen-python/wiki/Hardware-revisions
REVISION = "A"

Expand Down Expand Up @@ -49,6 +50,10 @@ def sighandler(signum, frame):
lcd_comm = LcdCommRevB(com_port="AUTO",
display_width=320,
display_height=480)
elif REVISION == "SIMU":
print("Selected Simulated LCD")
lcd_comm = LcdSimulated(display_width=320,
display_height=480)
else:
print("ERROR: Unknown revision")
try:
Expand Down

0 comments on commit 9f4e134

Please sign in to comment.