rhubarbdog / microbit-LCD-driver

An i2c driver for 16x2 .. 40x4 LCD displays on the microbit
MIT License
0 stars 1 forks source link

problem with address in line 64, self.__bus.write(self.__addr,buf) of microbit_i2c_lcd.py #1

Open S2BLEE opened 2 years ago

S2BLEE commented 2 years ago

Hello! Our class for interaction prototyping uses this code for lcd i2c communication with it.

I try to use this code with multiple lcds.

But there`s some error occurs when I just adjust the ADDRESS constant

when I try to alter the ADDRESS constant with any number,

the OSerror, I2Cwrite error - 1010 occurs at

line 64 of microbit_i2c_lcd.py, which is

def write_cmd(self, cmd): buf=bytearray(1) buf[0]=cmd self.bus.write(self.addr,buf) ##<<here time.sleep_us(100)

How can i deal with this?

S2BLEE commented 2 years ago
rhubarbdog commented 1 year ago

i no longer have any hardware to test this with are you using i2c.detect() to get the address for the screen. I only know of 0x3f and 0x27

are you sure you have the correct part number for your lcd screen