Skip to content

Commit c274bfb

Browse files
authored
Fixed a bug that caused autoaddr to fail
1 parent 45c838d commit c274bfb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎lcd/I2C_LCD1602/mp_i2c_lcd1602.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def setdat(self, dat):
5252
self.send(dat<<4)
5353

5454
def autoaddr(self):
55-
for i in (32, 63):
55+
for i in range(32, 63):
5656
try:
5757
if self.i2c.readfrom(i, 1):
5858
return i
@@ -121,4 +121,4 @@ def print(self, s):
121121
self.pb[self.px] = d
122122
self.px += 1
123123
if self.px > 15:
124-
self.newline()
124+
self.newline()

0 commit comments

Comments
 (0)