import epd7in5b
from PIL import Image, ImageDraw, ImageFont, ImageOps
import re
from renderer import Rend

WIDTH = 640
HEIGHT = 384

def main():
    epd = epd7in5b.EPD()
    epd.init()

    rend = Rend()
    rend.render()

    print("start display frame")
    epd.display_frame(epd.get_frame_buffer(rend.image_black),epd.get_frame_buffer(rend.image_yellow))
    print("finish display frame")

	#display images
    #frame_black = epd.get_frame_buffer(Image.open('black.bmp'))
    #frame_yellow = epd.get_frame_buffer(Image.open('red2.bmp'))
    #epd.display_frame(frame_black, frame_yellow)

if __name__ == '__main__':
    main()
