Approved content

The content below is provided by a partner.

makecode-extensions/oled12864_i2c 1.5.0 GitHub

I2C OLED 128x64

makecode I2C OLED 128x64 extension for micro:bit.

Part of the drive base on fizban99’s microbit OLED driver:
https://github.com/fizban99/microbit_ssd1306

Author: shaoziyang
Date: 2018.Mar

Add extension

open your microbit makecode project, in Extension, paste

https://github.com/makecode-extensions/OLED12864_I2C

to search box then search, and click to add.

Basic usage

let item = 0
OLED12864_I2C.init(60)
OLED12864_I2C.rect(0, 0, 60, 30, 1)
OLED12864_I2C.showString(0, 0, "Hello!", 1)
OLED12864_I2C.showString(0, 1, "1234567890", 0)
item = 0
basic.forever(() => {
    OLED12864_I2C.showNumber(0, 3, item, 1)
    item += 1
    basic.pause(1000)
}) 

API

Demo

License

MIT

Copyright (c) 2018, microbit/micropython Chinese community

Supported targets

From microbit/micropython Chinese community

OLED12864_I2C=github:makecode-extensions/oled12864_i2c#v1.5.0