LED Strips and Digispark (no sp)

EL Wire/Tape/Panels, LEDs, pixels and strips, LCDs and TFTs, etc products from Adafruit

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
jonwa
 
Posts: 40
Joined: Sun Oct 23, 2011 7:56 pm

LED Strips and Digispark (no sp)

Post by jonwa »

I was looking forward to controlling my adafruit WS2081 led strips with the new digispark chip. They are so small, just about the same width as the led strip itself.
However, the adafruit WS2801 library a dependency on SP, which appears to be missing from the digispark.
There's comments out there in the blog world about removing references to SP and letting it rely on "bitbanging", whatever that means.

I can code in processing, but C? not so much. What's bitbanging and/or what might it take to end up with a version of the WS2801 that can work with digispark?

Thanks

User avatar
pburgess
 
Posts: 4161
Joined: Sun Oct 26, 2008 2:29 am

Re: LED Strips and Digispark (no sp)

Post by pburgess »

"Bitbanging" refers to doing in software something that's normally handled by an on-chip peripheral function. SPI (Serial Peripheral Interface) is one such feature that's present on ATmega chips but not the ATtiny used on the Digispark.

The Adafruit_WS2801 library can operate in either mode (bitbang or hardware SPI)...but as written, still requires hardware support in order to compile, even if it's not used.

The shortest route to getting something working on the Digispark would be to make a fork of the library and strip out all the hardware SPI-specific functions and logic, so only the bitbang cases remain. Adapting the existing code to compile for either case is non-trivial (it might eventually happen, like when Gemma ships, but at this moment there's been no use case and it isn't really a priority).

User avatar
jonwa
 
Posts: 40
Joined: Sun Oct 23, 2011 7:56 pm

Re: LED Strips and Digispark (no sp)

Post by jonwa »

Gemma?

User avatar
pburgess
 
Posts: 4161
Joined: Sun Oct 26, 2008 2:29 am

Re: LED Strips and Digispark (no sp)

Post by pburgess »

It's a small ATtiny-based wearable board from Adafruit (like Flora, but dinkier). Currently a work-in-progress with no release date set...which is why simply tearing out the SPI-specific logic in the library might be a quicker and easier approach.

User avatar
isdale
 
Posts: 80
Joined: Wed Dec 15, 2010 12:54 am

Re: LED Strips and Digispark (no sp)

Post by isdale »

We found a digispark compatible library on GitHub
https://github.com/nsthorat/LPD8806-bitbang-only
Just tested it and it worked well for 10-20 LED strips
More than that and the digispark gets hot.

User avatar
doublejosh
 
Posts: 16
Joined: Fri May 17, 2013 8:53 am

Re: LED Strips and Digispark (no sp)

Post by doublejosh »

Still over my head, but this is for LPD8806 rather than WS2801 LED chip strips. Sitting with a stack of Trinkets and strips of WS2801 RGB LEDs in fear of stagnation.

Looks like there may be hope, but still fairly confused.
https://github.com/tenaciousRas/lufa-ws2801
https://digistump.com/board/index.php?topic=227.0

And one more cross-link.
http://forums.adafruit.com/viewtopic.php?f=47&t=44122

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: LED Strips and Digispark (no sp)

Post by adafruit_support_mike »

It looks like you've added a comment to the end of a thread that's been dormant for some time. What problem are you having?

User avatar
doublejosh
 
Posts: 16
Joined: Fri May 17, 2013 8:53 am

Re: LED Strips and Digispark (no sp)

Post by doublejosh »

Trying to drive some WS2801 lights with a Trinket. However, all existing libraries rely on the SPI library.

User avatar
doublejosh
 
Posts: 16
Joined: Fri May 17, 2013 8:53 am

Re: LED Strips and Digispark (no sp)

Post by doublejosh »

OMG. Was able to strip out the SPI pieces from the standard WS2801 library and remove disposable functions to the point where it actually works on a Trinket. Can't believe it. Certainly beats the bitWrite direction I started down.

https://github.com/doublejosh/Blink_Trinket

For those interested I did have a brief bitbang work, but it was based on others' code intended for the LPD8806 model LED strips. You can find that here: https://github.com/doublejosh/Blink_Trinket/releases

User avatar
doublejosh
 
Posts: 16
Joined: Fri May 17, 2013 8:53 am

Re: LED Strips and Digispark (no sp)

Post by doublejosh »

Broke off the library into this tidy little repo...
https://github.com/doublejosh/Simple_WS2801

Locked
Please be positive and constructive with your questions and comments.

Return to “Glowy things (LCD, LED, TFT, EL) purchased at Adafruit”