update 2.9d&4.2, fix 5.65f&2.66b
This commit is contained in:
parent
17921b3b11
commit
2613454540
60 changed files with 805 additions and 328 deletions
|
|
@ -76,5 +76,5 @@ except IOError as e:
|
|||
|
||||
except KeyboardInterrupt:
|
||||
logging.info("ctrl + c:")
|
||||
epd1in54b.epdconfig.module_exit()
|
||||
epd1in54b_V2.epdconfig.module_exit()
|
||||
exit()
|
||||
|
|
|
|||
|
|
@ -28,8 +28,8 @@ try:
|
|||
|
||||
# Drawing on the Horizontal image
|
||||
logging.info("1.Drawing on the Horizontal image...")
|
||||
HBlackimage = Image.new('1', (epd.height, epd.width), 255) # 298*126
|
||||
HRYimage = Image.new('1', (epd.height, epd.width), 255) # 298*126 ryimage: red or yellow image
|
||||
HBlackimage = Image.new('1', (epd.height, epd.width), 255) # 296*152
|
||||
HRYimage = Image.new('1', (epd.height, epd.width), 255) # 296*152 ryimage: red or yellow image
|
||||
drawblack = ImageDraw.Draw(HBlackimage)
|
||||
drawry = ImageDraw.Draw(HRYimage)
|
||||
drawblack.text((10, 0), 'hello world', font = font24, fill = 0)
|
||||
|
|
@ -62,8 +62,8 @@ try:
|
|||
|
||||
# Drawing on the Vertical image
|
||||
logging.info("4.Drawing on the Vertical image...")
|
||||
LBlackimage = Image.new('1', (epd.width, epd.height), 255) # 126*298
|
||||
LRYimage = Image.new('1', (epd.width, epd.height), 255) # 126*298
|
||||
LBlackimage = Image.new('1', (epd.width, epd.height), 255) # 152*296
|
||||
LRYimage = Image.new('1', (epd.width, epd.height), 255) # 152*296
|
||||
drawblack = ImageDraw.Draw(LBlackimage)
|
||||
drawry = ImageDraw.Draw(LRYimage)
|
||||
time.sleep(3)
|
||||
|
|
|
|||
|
|
@ -91,10 +91,11 @@ try:
|
|||
num = num + 1
|
||||
if(num == 10):
|
||||
break
|
||||
|
||||
|
||||
epd.init()
|
||||
logging.info("Clear...")
|
||||
epd.Clear(0xFF)
|
||||
|
||||
time.sleep(2)
|
||||
logging.info("Goto Sleep...")
|
||||
epd.sleep()
|
||||
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ try:
|
|||
|
||||
epd.Clear()
|
||||
logging.info("3.read bmp file")
|
||||
Himage = Image.open(os.path.join(picdir, '4.01inch-e-Paper.bmp'))
|
||||
Himage = Image.open(os.path.join(picdir, '4in01-1.bmp'))
|
||||
epd.display(epd.getbuffer(Himage))
|
||||
time.sleep(3)
|
||||
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ try:
|
|||
epd.display(epd.getbuffer(Himage))
|
||||
time.sleep(3)
|
||||
|
||||
logging.info("2.Drawing on the Vertical image...")
|
||||
# logging.info("2.Drawing on the Vertical image...")
|
||||
Himage = Image.new('RGB', (epd.height, epd.width), 0xffffff) # 255: clear the frame
|
||||
draw = ImageDraw.Draw(Himage)
|
||||
draw.text((10, 0), 'hello world', font = font24, fill = 0)
|
||||
|
|
@ -72,24 +72,14 @@ try:
|
|||
time.sleep(3)
|
||||
|
||||
logging.info("3.read bmp file")
|
||||
Himage = Image.open(os.path.join(picdir, '5in65f0.bmp'))
|
||||
epd.display(epd.getbuffer(Himage))
|
||||
time.sleep(3)
|
||||
|
||||
Himage = Image.open(os.path.join(picdir, '5in65f.bmp'))
|
||||
epd.display(epd.getbuffer(Himage))
|
||||
time.sleep(3)
|
||||
|
||||
Himage = Image.open(os.path.join(picdir, '5in65f2.bmp'))
|
||||
epd.display(epd.getbuffer(Himage))
|
||||
time.sleep(3)
|
||||
|
||||
|
||||
Himage = Image.open(os.path.join(picdir, '5in65f3.bmp'))
|
||||
epd.display(epd.getbuffer(Himage))
|
||||
time.sleep(3)
|
||||
|
||||
|
||||
Himage = Image.open(os.path.join(picdir, '5in65f4.bmp'))
|
||||
epd.display(epd.getbuffer(Himage))
|
||||
time.sleep(3)
|
||||
|
||||
epd.Clear()
|
||||
logging.info("Goto Sleep...")
|
||||
epd.sleep()
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ try:
|
|||
logging.info("4.read bmp file on window")
|
||||
Himage2 = Image.new('1', (epd.height, epd.width), 255) # 255: clear the frame
|
||||
Himage2_Other = Image.new('1', (epd.height, epd.width), 255) # 255: clear the frame
|
||||
bmp = Image.open(os.path.join(picdir, '100x100.bmp'))
|
||||
bmp = Image.open(os.path.join(picdir, '2in9.bmp'))
|
||||
Himage2.paste(bmp, (50,10))
|
||||
Himage2_Other.paste(bmp, (50,300))
|
||||
epd.display(epd.getbuffer(Himage2), epd.getbuffer(Himage2_Other))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue