Pico Pi and PicoDev LED

I connect PicoDev 3x RGB LED module to Pico Pi from the bought kit, all connections are correct using the expansion board and files downloaded and executed in thonny for all of the modules in the kit I get the same error of device not found. This is when it calls the RGB module and mentions ID’s or wiring in the error, i have not changed anything from the kit. How can i fix this.

5 Likes

Hi Dave,

Welcome!

A few things to check:

  • The Pico is plugged in correctly - the USB and LiPo connectors are on the same end (and the headers face down)
  • The LEDs on the PiicoDev modules should turn on to indicate they are getting power

If the tips above dont work, would it be possible to send through a photo of how you have everything connected?

4 Likes

Its connected up correctly going off the instructions on the tutorial and I get a power light showing on the RGB module but the main.py code fails on line 4 with the error I mentioned. The 3 LED’s don’t come on.

1 Like

2 Likes

Hi Dave,

Thanks for sending that photo through!

:thinking: Looks like everything is set up correctly, and the PiicoDev module is getting power, can you send us the error messages you were getting (copy and paste is best)?

-James

2 Likes


error

3 Likes

Hi Dave,

Thanks for sending that error through. The last time we had this error, it was solved by adding a small delay after initialising the sensor:

Try adding sleep(0.5) on line 5 (after leds = PiicoDev_RGB()), and see if that fixes things :thinking:

Keen to get to the bottom of this!
-James

2 Likes

Hi Dave,

Also try running the following code in the REPL
from machine import I2C
i2c = I2C(0)
i2c.scan()

this will print out all of the addresses of the modules you have plugged in, and is a quick confirmation that the device can respond.

EDIT: Writing code on your phone isn’t fun🥲

3 Likes

@Dave57340 IWC.scan() did not work for me, try i2c.scan().
RGB module is only device on I2C bus in my setup.
When this was posted I had not tested the RGB module I bought, so I did and no probs.
If you don’t get [8] like below then whatever is returned is the address of your RGB module.
If nothing is returned then there is a serious problem with the I2C interface or RGB module.
If you have a different PiicoDev module connect it and see what address you get.
Cheers
Jim

Type "help()" for more information.
>>> from machine import I2C
>>> i2c = I2C(0)
>>> IWC.scan()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'IWC' isn't defined
>>> i2c.scan()
[8]
>>>
3 Likes

Hi Jim and Dave,

Updated the code so it’s fixed (autocorrect is good most of the time)

To add to Jim’s reply each of the default addresses will be on the respective PiicoDev module page, the RGBs default should be 0x08 as Jim has posted.

4 Likes

I have tried multiple modules and get no return for any of them

1 Like

Hi Dave,

Sounds super odd, I’d try the following:

  • Unplug the USB cable, hold the BOOTSEL button and reflash the firmware
  • Reconnect to the Pico, ensure you have control and the REPL(The console is working, just a quick sanity check by running
a = 10
a


Then the I2C address check

from machine import I2C
i2c = I2C(0)
i2c.scan()

Once you run this could you please send through a screenshot (Windows default is Win+Shift+S)
Also the code you are running on the Pico

3 Likes

3 Likes

Hi Dave,

Curious, from the sounds of it its mechanical, I’d try reseating the connections(push em in hard) and testing with some of the other modules, testing with the I2C scan code whenever you make a change.

Sorry to hear you’re having a bad experience, the stuff Core makes has been tested in-house so I’d imagine the chances of it being faulty are quite slim.

2 Likes

@Dave57340 This shows the Pi Pico is working correctly as far as the Thonny interface to the PC. But there is a problem with the I2C interface. The listing shows blinkingLED.py on the Pico, I assume you have run this ok and the on board LED blinks, another indication the Pico is ok.

As @Liam120347 has stated it looks like a mechanical connection. I would remove the cable and examine it carefully along with the pins on the Piico and the RGB module. When connecting these small cables there is a definite click point where you can feel the cable has seated correctly. Be careful not to force the connector especially if it is upside down, the pins are very small and easy to damage.

I would also remove the Pico from the Expansion board and examine the pins and socket, the I2C interface connects to pins 8 & 9.

If you have another cable you could try that, and / or another PiicoDev module try that.

Hope it gets resolved.
Cheers
Jim

3 Likes

Hi @James46717
I have tried multiple cables and modules but get the same issue, I do have another expansion board I could maybe try otherwise I’m stumped. The blink LED on the Pico works fine.

Dave

2 Likes

Hi Dave,

I’d try the other expansion board and see if that works.

Just to confirm, were you running the default code in the tutorials?

1 Like

I swapped the board and its now working.

Thanks everyone for the help.

Dave

2 Likes