Skip to content

Commit 814bf7f

Browse files
committed
add rotate function
1 parent c928f91 commit 814bf7f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

‎LED/OLED_I2C_ASC/oled.py‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,10 @@ def draw(self):
102102
def zoom(self, z=1):
103103
d = 1 if z else 0
104104
self.command([0xD6,d])
105+
106+
def rotate(self, rotate=1):
107+
self.command([0xC0 | ((rotate & 1) << 3)])
108+
self.command([0xA0 | (rotate & 1)])
105109

106110
def line(self, x1, y1, x2, y2, c=1):
107111
return

0 commit comments

Comments
 (0)