Skip to content
Closed
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
16 changes: 16 additions & 0 deletions micropython/drivers/display/ssd1306/ssd1306.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,22 @@ def write_data(self, buf):
self.write_list[1] = buf
self.i2c.writevto(self.addr, self.write_list)

def zoom(self):
# Set OLED to display double size
temp = bytearray(3)
temp[0] = 0x00
temp[1] = 0xD6
temp[2] = 0x01
self.i2c.writeto(self.addr, self.temp)

def unzoom(self):
# Set OLED to display normal size
temp = bytearray(3)
temp[0] = 0x00
temp[1] = 0xD6
temp[2] = 0x00
self.i2c.writeto(self.addr, self.temp)


class SSD1306_SPI(SSD1306):
def __init__(self, width, height, spi, dc, res, cs, external_vcc=False):
Expand Down