FastSPI_LED2 preview release, now with teensy 3.0 support as first class citizen!

Status
Not open for further replies.

dgarcia42

Well-known member
Finally have a preview version of the FastSPI_LED2 library up - some notes on it, and how to get it, here - http://waitingforbigo.com/2013/02/19/fastspi_led2_preview_release/ - it's still a bit rough around the edges, but i'm hoping to get those worked out over the next few weeks (with a diving trip in the middle there, where I will be more focused on sharks and coral reefs than leds and 'duino types). The performance on a teensy 3.0 at 24Mhz is pretty close to an arduino at 16Mhz. I'm hoping to do some more targeted tuning to squeeze more out of the teensy 3.0 as time goes on.

Also, this version of the library should work with most of the other teensy variants out of the box. Even if I don't have pin/port mappings set up for them, it should fall back to slightly slower, but fairly available, mechanisms for twiddling pins.
 
thanks for releasing early for beta testing,... :)
tried with my Matrix (500LEDs of WS2801) but stil the same issue :( where I could tweak it now? :)


used your example from the webpage and tweaked it for ws2801:
#include <FastSPI_LED2.h>

// Simple rgb data structure
//#include "FastSPI_LED2.h"
#define NUM_LEDS 576
struct CRGB { byte r; byte g; byte b; };
struct CRGB ledData[NUM_LEDS];


// WS2801 definition - takes data/clock/latch pin values
WS2801Controller<11, 13, 10, 7> LedController;
void setup() {
// zero out all the leds
memset(ledData, 0, sizeof(struct CRGB) * NUM_LEDS);

// initialize the controller
LedController.init();
}

void loop() {
// set all the LEDs to red
for(int i = 0; i < NUM_LEDS; i++) { ledData.r = 255; }
LedController.showRGB((byte*)ledData, NUM_LEDS);
delay(100);
// zero out all the leds
memset(ledData, 0, sizeof(struct CRGB) * NUM_LEDS);
LedController.showRGB((byte*)ledData, NUM_LEDS);
delay(1000);
}


do you have a tip for me?
thanks and greetings
bernhard
 
So - speed is now a 0-255 value in the WS2801 definition - what used to be 7 is now, roughly, 128 I believe.
 
Hoorah... the example sketch included in the library compiled first try and ran flawlessly, on Teesy 3.0 with WS2811 light strips.
The light strip is behaving as expected.... Hopefully I'll get more time to play tomorrow.
 
@dgarcia24: I am sorry but changing the parameter from 0 to 128 and 255 makes a diffrence, but just a little! With 255 I get like 400LEDs working (with 0 arround 300) at 24MHz clock of the CPU.

trying the Software SPI (leaving the last parameter away) aint woking at all,... no LED is ligthing up.
Do you have some more hint I could try or test?
 
You can use the timing for the software SPI as well, in fact you should, otherwise it will default to 0 and on the teensy 3, the software SPI is nearly as fast as the hardware, however, I believe a timing of 255 will drive it to be slower than the hardware SPI. I've never had luck driving strings of more than 100 or so of those individual pixels (vs. the strips). Having multiple, shorter, strings and taking advantage of being able to have multiple software SPI outputs in the new library may need to be an option.
 
Status
Not open for further replies.
Back
Top