What error do you get when you use i2c = new I2C() instead of I2C1? And you're sure you changed all instances of I2C1 to i2c? It wouldn't be the same error message on software I2C.
i2c = new I2C()
Your board does have 'jumpers' on it for the I2C address, so I don't know whether the default state is all pulled up or all pulled down. Maybe you could try:
all the way from 0x20, 0x21 ... 0x27. And for some reason the example on the reference even gives 0x3F which might be worth trying - but I'm not sure where that comes from!
Also could you tell us the top line of text on the chip on the PCB? I can't make it out on the picture but if it's not PCF8574 then the address could be different.
edit: If you're using software I2C with i2c = new I2C() then input_pullup is what you'd expect. The pin state gets changed on the fly as it writes, but using the internal pullup means it doesn't need external resistors.
© Espruino, powered by microcosm.
Report a problem