the public repo for the e-paper bulletin board. It's a bulletin board that syncs over scuttlebutt :)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

10 lines
518 B

proc = subprocess.Popen(["curl", "wttr.in"], stdout=subprocess.PIPE)
(out, err) = proc.communicate()
#display the weather
Limage = Image.new('1', (epd4in2.EPD_HEIGHT, epd4in2.EPD_WIDTH), 255) # 255: clear the frame
draw = ImageDraw.Draw(Limage)
font12 = ImageFont.truetype('/usr/share/fonts/truetype/wqy/wqy-microhei.ttc', 12)
draw.text((10, 0), out, font = font12, fill = 0)
epd.display(epd.getbuffer(Limage))
time.sleep(1)
epd.sleep()