Pico RGB Keypad i2c pullup error

Hi all,
I was using the Emergency cat GIF macro example by @sandyjmacdonald using CircuitPython

But I’m getting an error on the I2C setup.

 File "<stdin>", line 43, in <module>
RuntimeError: SDA or SCL needs a pull up

This is the line that triggers the error

# Set up I2C for IO expander (addr: 0x20)
i2c = busio.I2C(board.GP5, board.GP4)

I have no idea if it’s an issue with CircuitPython or with the RGB Keypad or something I did wrong with soldering the pins to the pico.

The MicroPython example for the RGB Keypad runs without any issues so I would think it has nothing to do with the Pico or the Keypad.

Anyone that can give me some advise?

It’s possible to manually pull the pins up using resistors (4.7-10K) connecting the pin and 3v3, but at a glance Sandy doesn’t seem to have used those.

The board itself (the keypad) has I2C pullups, so it’s weird that that error is coming up. Not sure what could be going on. Is it definitely connected properly and is the soldering good?

1 Like

Thanks for the feedback!

Weird things are going on here :/

I had no problem running the MicroPython demo code for the RGB Keypad so I re-flashed the Pico with the Pimoroni MicroPython firmware to see if that code was still running as should but now I can’t get the lights to light up anymore.

While running MP, when I print the button number on press I get the correct number, so I guess the I2C connection is still working. I don’t know anything about the difference between MP en CP but I would think that they connect in the same way to the keypad?

And now that my RGB lights aren’t working anymore I really hope I didn’t destroy them while trying different things.

After some test with continuity test of my tester I found 2 problems: in my case the 4.7k ohm resistor soldered in the board has some soldering problem, so after re-soldered on the board the continuity test works pretty well. The second problem is that the RUN pin makes shor-circuit to the ground. Playing around with pins I’ve found a solution to make a middle socket between the Raspberry PICO and the keyboard socket itself. It seems to work for now, but probably we are bad lucky and we met some production problem? We remain in waiting for some news