forked from jarret/raspi-uart-waveshare
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest_cycle.py
executable file
·31 lines (23 loc) · 888 Bytes
/
test_cycle.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/usr/bin/env python3
# Copyright (c) 2019 Jarret Dyrbye
# Distributed under the MIT software license, see the accompanying
# file LICENSE or http://www.opensource.org/licenses/mit-license.php
import RPi.GPIO as GPIO
from waveshare.epaper import EPaper
from lib.invoicedisplay import InvoiceDisplay
from lib.selections import SELECTIONS
import time
if __name__ == '__main__':
with EPaper() as paper:
display = InvoiceDisplay(paper)
print("display is ready, starting in 2 seconds...")
time.sleep(2)
print("let's go!")
for selection in SELECTIONS:
display.draw_selection(selection)
print("sleeping between selections...")
time.sleep(1)
print("any remaining bytes to read from the device?")
b = paper.read()
print("%d bytes remaining" % len(b))
print("done everything")