simple OLED display drive

Discussion about programs, libraries and tools that work with MicroPython. Mostly these are provided by a third party.
Target audience: All users and developers of MicroPython.
Post Reply
shaoziyang
Posts: 363
Joined: Sun Apr 17, 2016 1:55 pm

simple OLED display drive

Post by shaoziyang » Mon Jan 27, 2020 11:12 am

A simple micropython OLED display dirve.

https://github.com/micropython-Chinese- ... ED_I2C_ASC

Image

Demo

Code: Select all

from machine import I2C, Pin
from oled import OLED12864_I2C

i2c = I2C(-1, scl = Pin(27, pull = Pin.PULL_UP), sda = Pin(13, pull = Pin.PULL_UP))

oled = OLED12864_I2C(i2c)
oled.text(0, 0, '0123456789')
oled.Font('Font_8x16')
oled.text(0, 1, '0123456789')
oled.Font('Font_12x24')
oled.text(0, 3, '0123456789')

stanely
Posts: 55
Joined: Fri Jan 17, 2020 5:19 am
Location: Ohio, USA

Re: simple OLED display drive

Post by stanely » Tue Jan 28, 2020 3:59 pm

Works well. Thank you! How did you map the fonts?

shaoziyang
Posts: 363
Joined: Sun Apr 17, 2016 1:55 pm

Re: simple OLED display drive

Post by shaoziyang » Wed Jan 29, 2020 9:52 am

I use bytes to store font for simplicity. If ram is small or font is big, you need use file to store font.

Post Reply