calibrate and align
This commit is contained in:
+3
-3
@@ -73,7 +73,7 @@ try:
|
||||
epd.init(epd.PART_UPDATE)
|
||||
lyrics = open("lyrics.txt", "r").readlines()
|
||||
def get_lyric():
|
||||
LENGTH = 15
|
||||
LENGTH = 17
|
||||
lyric = choice(lyrics)
|
||||
out_lyric = ""
|
||||
counter = 0
|
||||
@@ -91,10 +91,10 @@ try:
|
||||
print(lyric)
|
||||
time_image = Image.new('1', (epd.height, epd.width), 255)
|
||||
time_draw = ImageDraw.Draw(time_image)
|
||||
time_image.paste(bmp, (2,2))
|
||||
time_image.paste(bmp, (randint(0, 40),randint(0, 10)))
|
||||
time_draw.rectangle((160, 90, 250, 122), fill = 255)
|
||||
time_draw.text((160, 90), time.strftime('%H:%M'), font = font24, fill = 0)
|
||||
time_draw.text((140, 10), lyric, font = font15, fill = 0)
|
||||
time_draw.text((130, 10), lyric, font = font15, fill = 0)
|
||||
epd.displayPartial(epd.getbuffer(time_image))
|
||||
epd.displayPartial(epd.getbuffer(time_image))
|
||||
epd.displayPartial(epd.getbuffer(time_image))
|
||||
|
||||
Reference in New Issue
Block a user