-
Notifications
You must be signed in to change notification settings - Fork 9
/
cleardisplay.py
35 lines (29 loc) · 1.04 KB
/
cleardisplay.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
32
33
34
35
#!/usr/bin/python
# -*- coding:utf-8 -*-
# ***************************************************
# This is a example program for
# a Word Clock using Raspberry Pi B+, Waveshare ePaper Display and ProtoStax enclosure
# --> https://www.waveshare.com/product/modules/oleds-lcds/e-paper/2.7inch-e-paper-hat-b.htm
# --> https://www.protostax.com/products/protostax-for-raspberry-pi-b
#
# This program is used to clear the ePaper display. If you are powering down your
# Raspberry Pi and storing it and the ePaper display, it is recommended
# that the display be cleared prior to storage, to prevent any burn-in.
# Written by Sridhar Rajagopal for ProtoStax.
# BSD license. All text above must be included in any redistribution
# *
import sys
sys.path.append(r'lib')
import epd2in7b
import time
from PIL import Image,ImageDraw,ImageFont
import traceback
try:
epd = epd2in7b.EPD()
epd.init()
print("Clear...")
epd.Clear()
epd.sleep()
except :
print ('traceback.format_exc():\n%s',traceback.format_exc())
exit()