Skip to content

Commit 7656e96

Browse files
committed
use extension instead of package
1 parent 3a2485d commit 7656e96

File tree

1 file changed

+23
-8
lines changed

1 file changed

+23
-8
lines changed

README.md

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,39 @@
11
# I2C OLED 128x64
22

3-
makecode I2C OLED 128x64 package for micro:bit.
3+
makecode I2C OLED 128x64 extension for micro:bit.
44

55
Part of the drive base on fizban99's microbit OLED driver:
6-
https://github.com/fizban99/microbit_ssd1306
6+
https://github.com/fizban99/microbit_ssd1306
77

88
Author: shaoziyang
99
Date: 2018.Mar
1010

11-
![](https://raw.githubusercontent.com/microbit-makecode-packages/OLED12864_I2C/master/icon.png)
11+
![](oled.png)
1212

1313

14-
## usage
14+
## Add extension
1515

16-
open your microbit makecode project, in Add Package, paste
16+
open your microbit makecode project, in Extension, paste
1717

18-
https://github.com/microbit-makecode-packages/OLED12864_I2C
18+
https://github.com/makecode-extensions/OLED12864_I2C
1919

20-
to search box then search.
20+
to search box then search, and click to add.
2121

22+
## Basic usage
23+
24+
```
25+
let item = 0
26+
OLED12864_I2C.init(60)
27+
OLED12864_I2C.rect(0, 0, 60, 30, 1)
28+
OLED12864_I2C.showString(0, 0, "Hello!", 1)
29+
OLED12864_I2C.showString(0, 1, "1234567890", 0)
30+
item = 0
31+
basic.forever(() => {
32+
OLED12864_I2C.showNumber(0, 3, item, 1)
33+
item += 1
34+
basic.pause(1000)
35+
})
36+
```
2237

2338
## API
2439

@@ -87,7 +102,7 @@ draw a rectangle.
87102

88103
## Demo
89104

90-
![](https://raw.githubusercontent.com/microbit-makecode-packages/OLED12864_I2C/master/demo.png)
105+
![](demo.png)
91106

92107

93108

0 commit comments

Comments
 (0)