Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can the text size change? #6

Open
ElRobotaBiomedico opened this issue May 4, 2022 · 3 comments
Open

Can the text size change? #6

ElRobotaBiomedico opened this issue May 4, 2022 · 3 comments

Comments

@ElRobotaBiomedico
Copy link

Hello, first of all, thank you very much for the contribution, it is very appreciated. I only have a small doubt, is there any function that allows you to change the size of the text?

I'm interested in changing the text size for a project in which I work

@MrDMurray
Copy link

Same as above, would be nice to include text sizes

@EvansMike
Copy link

The chip supports double size text natively but command to do so is not in this driver.
For my project I added a method to do this.

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

The setting is retained by the display over reboots so an unzoom command is also needed.

@EvansMike
Copy link

I've done a PR on the upstream micropython-lib repo.
https://github.com/micropython/micropython-lib

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants