Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

e-paper busy endless loop work-around for epd7in5_V2.py #193

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
17 changes: 9 additions & 8 deletions RaspberryPi_JetsonNano/python/lib/waveshare_epd/epd7in5_V2.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,13 +128,14 @@ def send_data2(self, data):
epdconfig.digital_write(self.cs_pin, 1)

def ReadBusy(self):
logger.debug("e-Paper busy")
self.send_command(0x71)
busy = epdconfig.digital_read(self.busy_pin)
while(busy == 0):
self.send_command(0x71)
busy = epdconfig.digital_read(self.busy_pin)
epdconfig.delay_ms(20)
logger.debug("e-Paper busy")
iter = 0
while epdconfig.digital_read(self.busy_pin) == 0:
epdconfig.delay_ms(100)
iter += 1
if iter > 150:
logger.info("Forced e-paper busy release")
break
logger.debug("e-Paper busy release")

def SetLut(self, lut_vcom, lut_ww, lut_bw, lut_wb, lut_bb):
Expand Down Expand Up @@ -200,7 +201,7 @@ def init(self):
self.ReadBusy()

self.send_command(0X00) #PANNEL SETTING
self.send_data(0x3F) #KW-3f KWR-2F BWROTP 0f BWOTP 1f
self.send_data(0x1F) #KW-3f KWR-2F BWROTP 0f BWOTP 1f

self.send_command(0x61) #tres
self.send_data(0x03) #source 800
Expand Down