Created
September 18, 2018 23:51
-
-
Save pdp7/61ba1e03769c0dfeb75fedc1227284d4 to your computer and use it in GitHub Desktop.
partial update by Michael Welling for micropython on OHS18 badge
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
change the LUT settings | |
Michael WellingSep-17 10:29 PM | |
def set_update_partial(self): | |
#LUTDefault_partial | |
self.send_command(0x32) | |
self.send_data(0x18) | |
self.send_data(0x00) | |
self.send_data(0x00) | |
self.send_data(0x00) | |
self.send_data(0x00) | |
self.send_data(0x00) | |
self.send_data(0x00) | |
self.send_data(0x00) | |
self.send_data(0x00) | |
self.send_data(0x00) | |
self.send_data(0x00) | |
self.send_data(0x00) | |
self.send_data(0x00) | |
self.send_data(0x00) | |
self.send_data(0x00) | |
self.send_data(0x00) | |
self.send_data(0x0F) | |
self.send_data(0x01) | |
self.send_data(0x00) | |
self.send_data(0x00) | |
self.send_data(0x00) | |
self.send_data(0x00) | |
self.send_data(0x00) | |
self.send_data(0x00) | |
self.send_data(0x00) | |
self.send_data(0x00) | |
self.send_data(0x00) | |
self.send_data(0x00) | |
self.send_data(0x00) | |
#PowerOn | |
self.send_command(0x22) | |
self.send_data(0xc0) | |
self.send_command(0x20) | |
self.wait_until_idle() | |
Michael WellingSep-17 10:30 PM | |
>>> epd.set_update_partial() | |
>>> epd.display_string_at(fb, 0, 0, "Hello World!", font20, gxgde0213b1.COLORED) | |
>>> epd.clear_frame(fb) | |
>>> epd.display_string_at(fb, 0, 0, "Hello World!", font20, gxgde0213b1.COLORED) | |
>>> epd.display_frame(fb) | |
Michael WellingSep-17 10:30 PM | |
you can see a slight ghost of the previous frame | |
Michael WellingSep-17 10:30 PM | |
but not flashing | |
Michael WellingSep-17 10:34 PM | |
might be might something because not the updates are offset | |
Michael WellingSep-17 10:34 PM | |
*missing | |
oshparkSep-17 10:39 PM | |
@Michael Welling very nice, is there a commit I can pull in? | |
Michael WellingSep-17 10:44 PM | |
not yet | |
Michael WellingSep-17 10:44 PM | |
I can do a pull request when I do | |
oshpark |
Author
pdp7
commented
Sep 19, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment