Hi,
I’m trying to get the CircuitPython is31fl3731 LedShim Rainbow example to run on a Pico.
I get various error such as SDA not defined and No pull-up resistors found. I added a2.2k resistor to the sda and scl lines but it made no difference.
I am using GP0 and GP1
is31fl3731 With Pimoroni Led Shim
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- mikeysklar
- Posts: 14182
- Joined: Mon Aug 01, 2016 8:10 pm
Re: is31fl3731 With Pimoroni Led Shim
Post your code and errors in CODE blocks please.
This sounds like you need to modify the Pico specific pins naming conventions.
https://learn.adafruit.com/getting-star ... on/pinouts
This sounds like you need to modify the Pico specific pins naming conventions.
https://learn.adafruit.com/getting-star ... on/pinouts
- Toldcodger
- Posts: 31
- Joined: Mon Nov 04, 2019 4:52 pm
Re: is31fl3731 With Pimoroni Led Shim
Hi,
Thanks for the response.
i started by using the is31fl3731_ledshim_rainbow.py script from the circuitpython examples folder. That's when I got the SCL not defined error. I did a little digging and found this,
https://learn.adafruit.com/getting-star ... on/pinouts
Basically it says;
import board
i2c = board.I2C() # Does not work on the Pico.
Try this
import board
import busio
i2c = busio.I2C(scl=board.GP1, sda=board.GP0)
I've attached the file I modified. The original file is identical apart from this line:
i2c = busio.I2C(board.SCL, board.SDA)
Thanks for the response.
i started by using the is31fl3731_ledshim_rainbow.py script from the circuitpython examples folder. That's when I got the SCL not defined error. I did a little digging and found this,
https://learn.adafruit.com/getting-star ... on/pinouts
Basically it says;
import board
i2c = board.I2C() # Does not work on the Pico.
Try this
import board
import busio
i2c = busio.I2C(scl=board.GP1, sda=board.GP0)
I've attached the file I modified. The original file is identical apart from this line:
i2c = busio.I2C(board.SCL, board.SDA)
- Attachments
-
- is31fl3731_ledshim_rainbow.py
- (1.13 KiB) Downloaded 10 times
- Toldcodger
- Posts: 31
- Joined: Mon Nov 04, 2019 4:52 pm
Re: is31fl3731 With Pimoroni Led Shim
Sorry,
I forgot to show the full error:
Traceback (most recent call last):
File "<stdin>", line 9, in <module>
RuntimeError: No pull up found on SDA or SCL; check your wiring
I forgot to show the full error:
Traceback (most recent call last):
File "<stdin>", line 9, in <module>
RuntimeError: No pull up found on SDA or SCL; check your wiring
- mikeysklar
- Posts: 14182
- Joined: Mon Aug 01, 2016 8:10 pm
Re: is31fl3731 With Pimoroni Led Shim
Yep, you got the right syntax now for the i2c pins.
Can you post a photo of how you have connected the SHIM to the Pico? It seems like it might not be connected to the proper pins.
Can you post a photo of how you have connected the SHIM to the Pico? It seems like it might not be connected to the proper pins.
- Toldcodger
- Posts: 31
- Joined: Mon Nov 04, 2019 4:52 pm
Re: is31fl3731 With Pimoroni Led Shim
I’ve added a photo of the ledshim and Pico. The photo shows it set for 5v but i’ve tried it with 3.3 with the same results.
The ledshim is on a double row of pins as it would be on a RPi. I’ve checked for continuity and cross connections, everything is fine.
As the shim literally slots on the gpio pins, I’m wondering if it’s just a poor connection. When my Grandson goes home I’ll try soldering the connections on the ledshim.
The ledshim is on a double row of pins as it would be on a RPi. I’ve checked for continuity and cross connections, everything is fine.
As the shim literally slots on the gpio pins, I’m wondering if it’s just a poor connection. When my Grandson goes home I’ll try soldering the connections on the ledshim.
- Attachments
-
- 975F3138-27CE-45A2-B3FA-60DF46964944.jpeg (756.57 KiB) Viewed 199 times
-
- 12F4A8D6-F608-48C3-BB86-5BCD20ED0D20.jpeg (652.12 KiB) Viewed 199 times
- mikeysklar
- Posts: 14182
- Joined: Mon Aug 01, 2016 8:10 pm
Re: is31fl3731 With Pimoroni Led Shim
I have not seen anyone try to use the LED shim with a pico only a Raspberry Pi based board, but it's i2c so should be possible.
You will want to keep the voltage at 3v3 to avoid damaging your Pico.
You posted an image of a Raspberry Pi pinout, but you are using a Pico Pi which is not the same.
At this point I'm going to refer you over to the Pimoroni forums as they support the usage of their hardware.
http://forums.pimoroni.com/
You will want to keep the voltage at 3v3 to avoid damaging your Pico.
You posted an image of a Raspberry Pi pinout, but you are using a Pico Pi which is not the same.
At this point I'm going to refer you over to the Pimoroni forums as they support the usage of their hardware.
http://forums.pimoroni.com/
- Toldcodger
- Posts: 31
- Joined: Mon Nov 04, 2019 4:52 pm
Re: is31fl3731 With Pimoroni Led Shim
Thanks for your assistance mikeysklar.
I posted the pinouts for the ledshim to show that I had taken the correct connections for the sda & scl connections.
I found some code on the Adafruit site to get the I2C address. That doesn’t work either and comes back with an I2C not defined error. I have used an I2C display on the GP0 & GP1 pins so I will try that again tomorrow to prove those pins work. I’ll try the I2C detector code too.
I tried to get a Pimoroni Blinkt working on the Pico. The problem with that is getting a 102apa library for either micropython or circuitpython. Someone on there said I needed to use 3.3v. Another responder said the Raspberry Pi is 3.3 logic and the Blinkt works OK on the Pi so 5v won’t cause a problem on the Pico. I presumed the LEDshim would be the same. I have tried using 3.3v but got the same errors.
I posted the pinouts for the ledshim to show that I had taken the correct connections for the sda & scl connections.
I found some code on the Adafruit site to get the I2C address. That doesn’t work either and comes back with an I2C not defined error. I have used an I2C display on the GP0 & GP1 pins so I will try that again tomorrow to prove those pins work. I’ll try the I2C detector code too.
I tried to get a Pimoroni Blinkt working on the Pico. The problem with that is getting a 102apa library for either micropython or circuitpython. Someone on there said I needed to use 3.3v. Another responder said the Raspberry Pi is 3.3 logic and the Blinkt works OK on the Pi so 5v won’t cause a problem on the Pico. I presumed the LEDshim would be the same. I have tried using 3.3v but got the same errors.
- mikeysklar
- Posts: 14182
- Joined: Mon Aug 01, 2016 8:10 pm
Re: is31fl3731 With Pimoroni Led Shim
@Toldcodger,
You need to start a thread with Pimoroni on connecting a Pico with their LED Shim. Pimoroni handles their own hardware support.
The Pico is not 5v tolerant on the i2c pins so 5v is a bad idea. Keep it 3v3.
You need to start a thread with Pimoroni on connecting a Pico with their LED Shim. Pimoroni handles their own hardware support.
The Pico is not 5v tolerant on the i2c pins so 5v is a bad idea. Keep it 3v3.
Please be positive and constructive with your questions and comments.