Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions ssd1309.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,14 @@ def clear_buffers(self):
"""Clear buffer.
"""
self.monoFB.fill(0x00)


def contrast(self, contrast):
"""Set contrast level 0 to 255
"""
self.write_cmd(CONTRAST_CONTROL)
self.write_cmd(contrast)


def draw_bitmap(self, path, x, y, w, h, invert=False, rotate=0):
"""Load MONO_HMSB bitmap from disc and draw to screen.
Expand Down