Skip to content

Commit 37dcc35

Browse files
committed
Compatible with makecode V0
1 parent e50ed68 commit 37dcc35

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

main.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ namespace I2C_LCD1602 {
4848
let addr = 0x20
4949
let d1 = 0, d2 = 0
5050
while (k && (addr < 0x28)) {
51-
pins.i2cWriteNumber(addr, 0xffffffff, NumberFormat.Int32LE)
51+
pins.i2cWriteNumber(addr, -1, NumberFormat.Int32LE)
5252
d1 = pins.i2cReadNumber(addr, NumberFormat.Int8LE) % 16
5353
pins.i2cWriteNumber(addr, 0, NumberFormat.Int16LE)
5454
d2 = pins.i2cReadNumber(addr, NumberFormat.Int8LE)
@@ -59,7 +59,7 @@ namespace I2C_LCD1602 {
5959

6060
addr = 0x38
6161
while (k && (addr < 0x40)) {
62-
pins.i2cWriteNumber(addr, 0xffffffff, NumberFormat.Int32LE)
62+
pins.i2cWriteNumber(addr, -1, NumberFormat.Int32LE)
6363
d1 = pins.i2cReadNumber(addr, NumberFormat.Int8LE) % 16
6464
pins.i2cWriteNumber(addr, 0, NumberFormat.Int16LE)
6565
d2 = pins.i2cReadNumber(addr, NumberFormat.Int8LE)

0 commit comments

Comments
 (0)