๐ŸŽ„โ›„โ„๏ธ๐ŸŽ It's beginning to look a lot like ADABOX-mas! The next ADABOX from Adafruit ships soon! Get yours now, or give as a gift! ๐ŸŽ„โ›„โ„๏ธ๐ŸŽ
0

Trouble with DotStar and SPI
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Trouble with DotStar and SPI

by killsburydouboy on Mon Jun 10, 2019 4:17 pm

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.

killsburydouboy
 
Posts: 11
Joined: Mon May 20, 2019 9:05 pm

Re: Trouble with DotStar and SPI

by adafruit_support_carter on Tue Jun 11, 2019 2:19 pm


adafruit_support_carter
 
Posts: 13589
Joined: Tue Nov 29, 2016 2:45 pm

Re: Trouble with DotStar and SPI

by killsburydouboy on Thu Jun 13, 2019 7:56 am

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.

killsburydouboy
 
Posts: 11
Joined: Mon May 20, 2019 9:05 pm

Re: Trouble with DotStar and SPI

by adafruit_support_carter on Thu Jun 13, 2019 12:10 pm

What DotStar product are you working with? Can you link to product page.

adafruit_support_carter
 
Posts: 13589
Joined: Tue Nov 29, 2016 2:45 pm

Re: Trouble with DotStar and SPI

by killsburydouboy on Thu Jun 13, 2019 12:36 pm

These are the LED's that I have purchased.
https://www.amazon.com/gp/product/B07MDD191C

Couldn't find them on the Adafruit website.

killsburydouboy
 
Posts: 11
Joined: Mon May 20, 2019 9:05 pm

Re: Trouble with DotStar and SPI

by adafruit_support_carter on Thu Jun 13, 2019 12:39 pm

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.

adafruit_support_carter
 
Posts: 13589
Joined: Tue Nov 29, 2016 2:45 pm

Re: Trouble with DotStar and SPI

by killsburydouboy on Fri Jun 14, 2019 11:39 am

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.

killsburydouboy
 
Posts: 11
Joined: Mon May 20, 2019 9:05 pm

Re: Trouble with DotStar and SPI

by adafruit_support_carter on Fri Jun 14, 2019 12:21 pm

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.

adafruit_support_carter
 
Posts: 13589
Joined: Tue Nov 29, 2016 2:45 pm

Please be positive and constructive with your questions and comments.