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

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