diff --git a/micropython/drivers/display/ssd1306/ssd1306.py b/micropython/drivers/display/ssd1306/ssd1306.py index 37ad682de..d1ac34c41 100644 --- a/micropython/drivers/display/ssd1306/ssd1306.py +++ b/micropython/drivers/display/ssd1306/ssd1306.py @@ -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):