diff --git a/ssd1309.py b/ssd1309.py index fdbf32e..ed76fb3 100644 --- a/ssd1309.py +++ b/ssd1309.py @@ -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.