@@ -4,19 +4,31 @@ makecode I2C LCD1602 package for micro:bit
44
55Author: shaoziyang
66Date: 2018.Mar
7-
8- ![ ] ( https://raw.githubusercontent.com/microbit-makecode-packages/i2cLCD1602/master/icon.png )
97
10- ![ ] ( https://raw.githubusercontent.com/microbit-makecode-packages/i2cLCD1602/master/ lcd.jpg)
8+ ![ ] ( lcd.jpg )
119
12- ## usage
10+ ## Add extension
1311
14- open your microbit makecode project, in Add Package , paste
12+ open your microbit makecode project, in Extension , paste
1513
16- https://github.com/microbit- makecode-packages/i2cLCD1602
14+ https://github.com/makecode-packages/i2cLCD1602
1715
1816to search box then search.
1917
18+ ## Basic usage
19+
20+ ```
21+ let item = 0
22+ I2C_LCD1602.LcdInit(0)
23+ I2C_LCD1602.ShowString("Hello", 0, 0)
24+ basic.forever(() => {
25+ item += 1
26+ I2C_LCD1602.ShowNumber(item, 0, 1)
27+ basic.pause(1000)
28+ })
29+ ```
30+
31+
2032## I2C Address
2133- PCF8574: 39
2234- PCF8574A: 63
@@ -26,7 +38,7 @@ to search box then search.
2638
2739- LcdInit(Addr: number)
2840Initial LCD
29- Addr: I2C Address. If Addr is zero, it will automatic recognition correctly address.
41+ Addr: I2C Address. If Addr is zero, it will try to recognition correctly address automaticly .
3042
3143- ShowNumber(n: number, x: number, y: number)
3244show a number in LCD at given position.
@@ -64,7 +76,7 @@ shift right screen
6476
6577## Demo
6678
67- ![ ] ( https://raw.githubusercontent.com/microbit-makecode-packages/i2cLCD1602/master/ demo.jpg)
79+ ![ ] ( demo.jpg )
6880
6981## License
7082
0 commit comments