Hello,
I have some DotStar LEDs that I purchased. I would like to use the SPI on the Raspberry Pi to control the lights, as the animations need to be handled quickly. However, I'm having difficulty setting it up that way. I found this tutorial https://cdn-learn.adafruit.com/download ... r-leds.pdf and it works if the LED strip is conncted to digital pins but I need it connected to the SPI pins. Is there a tutorial for this? I've been searching online for a while, coming up empty.
Code is below:
import board
importadafruit_dotstart as dotstar
num_pixels = 120
dots = dotstar.DotStar(board.sck,board.MOSI, num_pixels, brightness=0.2)
dots.fill((255,0,0))
None of the LED's light up, I'm thinking it has to do something with how my pins are set up.
Trouble with DotStar and SPI
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- adafruit_support_carter
- Posts: 29482
- Joined: Tue Nov 29, 2016 2:45 pm
Re: Trouble with DotStar and SPI
The guide shows both:
https://learn.adafruit.com/adafruit-dot ... iring-12-8
The first example is hardware SPI:
https://learn.adafruit.com/adafruit-dot ... hon#step-9
https://learn.adafruit.com/adafruit-dot ... iring-12-8
The first example is hardware SPI:
https://learn.adafruit.com/adafruit-dot ... hon#step-9
- killsburydouboy
- Posts: 11
- Joined: Mon May 20, 2019 9:05 pm
Re: Trouble with DotStar and SPI
I did find that tutorial and followed it. The lights still do not work, they don't even turn on. They turn on using the other method, but I need to use the SPI connections.
Edit: I have the APA107 LED's, not the 102's. Does this library support the SPI function with the newer ones? It appears that the APA107's are just an upgrade version of the 102's.
Edit: I have the APA107 LED's, not the 102's. Does this library support the SPI function with the newer ones? It appears that the APA107's are just an upgrade version of the 102's.
- adafruit_support_carter
- Posts: 29482
- Joined: Tue Nov 29, 2016 2:45 pm
Re: Trouble with DotStar and SPI
What DotStar product are you working with? Can you link to product page.
- killsburydouboy
- Posts: 11
- Joined: Mon May 20, 2019 9:05 pm
Re: Trouble with DotStar and SPI
These are the LED's that I have purchased.
https://www.amazon.com/gp/product/B07MDD191C
Couldn't find them on the Adafruit website.
https://www.amazon.com/gp/product/B07MDD191C
Couldn't find them on the Adafruit website.
- adafruit_support_carter
- Posts: 29482
- Joined: Tue Nov 29, 2016 2:45 pm
Re: Trouble with DotStar and SPI
Not sure. We've only tested the library with the DotStars we sell. These may have a different timing or some other difference(s) that the DotStar library does not support.
- killsburydouboy
- Posts: 11
- Joined: Mon May 20, 2019 9:05 pm
Re: Trouble with DotStar and SPI
I was able to get them working with that tutorial with the bit bang SPI interface but not the SPI. Any idea? I've been searching online for a few days not and I'm not finding much out there.
- adafruit_support_carter
- Posts: 29482
- Joined: Tue Nov 29, 2016 2:45 pm
Re: Trouble with DotStar and SPI
Not really. Check your pins - are you using the HW SPI pins? Check the timing - is the SPI bus being clocked correctly? Etc. But if it's nothing obvious you might need to connect a logic probe so you can compare what the working output is doing vs. the non-working output.
Please be positive and constructive with your questions and comments.