@@ -4,19 +4,31 @@ makecode I2C LCD1602 package for micro:bit
4
4
5
5
Author: shaoziyang
6
6
Date: 2018.Mar
7
-
8
- ![ ] ( https://raw.githubusercontent.com/microbit-makecode-packages/i2cLCD1602/master/icon.png )
9
7
10
- ![ ] ( https://raw.githubusercontent.com/microbit-makecode-packages/i2cLCD1602/master/ lcd.jpg)
8
+ ![ ] ( lcd.jpg )
11
9
12
- ## usage
10
+ ## Add extension
13
11
14
- open your microbit makecode project, in Add Package , paste
12
+ open your microbit makecode project, in Extension , paste
15
13
16
- https://github.com/microbit- makecode-packages/i2cLCD1602
14
+ https://github.com/makecode-packages/i2cLCD1602
17
15
18
16
to search box then search.
19
17
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
+
20
32
## I2C Address
21
33
- PCF8574: 39
22
34
- PCF8574A: 63
@@ -26,7 +38,7 @@ to search box then search.
26
38
27
39
- LcdInit(Addr: number)
28
40
Initial 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 .
30
42
31
43
- ShowNumber(n: number, x: number, y: number)
32
44
show a number in LCD at given position.
@@ -64,7 +76,7 @@ shift right screen
64
76
65
77
## Demo
66
78
67
- ![ ] ( https://raw.githubusercontent.com/microbit-makecode-packages/i2cLCD1602/master/ demo.jpg)
79
+ ![ ] ( demo.jpg )
68
80
69
81
## License
70
82
0 commit comments