when the guys are around they will post.
i'm trying to get in touch with the guys who make the FastSPI library. I believe the problem is in that library.
have you tried running the FastSPI test sketch?
Moderators: adafruit_support_bill, adafruit
tmaniac wrote:when using the attached library you can compile in arduino 1.
it's the library from source.
can you run the example when you compile in v023?
Becouse nothing happens on my side when i upload the program to the arduino.
#include <FastSPI_LED.h>
#define NUM_LEDS 49
// Sometimes chipsets wire in a backwards sort of way
struct CRGB { unsigned char b; unsigned char r; unsigned char g; };
//struct CRGB { unsigned char r; unsigned char g; unsigned char b; };
struct CRGB *leds;
#define PIN 4
void setup()
{
FastSPI_LED.setLeds(NUM_LEDS);
//FastSPI_LED.setChipset(CFastSPI_LED::SPI_TM1809);
//FastSPI_LED.setChipset(CFastSPI_LED::SPI_LPD6803);
//FastSPI_LED.setChipset(CFastSPI_LED::SPI_HL1606);
//FastSPI_LED.setChipset(CFastSPI_LED::SPI_595);
FastSPI_LED.setChipset(CFastSPI_LED::SPI_WS2801);
FastSPI_LED.setPin(PIN,11,13);
FastSPI_LED.setDataRate(1);
FastSPI_LED.init();
FastSPI_LED.start();
leds = (struct CRGB*)FastSPI_LED.getRGBData();
}
void loop() {
// one at a time
for(int j = 0; j < 3; j++) {
for(int i = 0 ; i < NUM_LEDS; i++ ) {
memset(leds, 0, NUM_LEDS * 3);
switch(j) {
case 0: leds[i].r = 255; break;
case 1: leds[i].g = 255; break;
case 2: leds[i].b = 255; break;
}
FastSPI_LED.show();
delay(10);
}
}
// growing/receeding bars
for(int j = 0; j < 3; j++) {
memset(leds, 0, NUM_LEDS * 3);
for(int i = 0 ; i < NUM_LEDS; i++ ) {
switch(j) {
case 0: leds[i].r = 255; break;
case 1: leds[i].g = 255; break;
case 2: leds[i].b = 255; break;
}
FastSPI_LED.show();
delay(10);
}
for(int i = NUM_LEDS-1 ; i >= 0; i-- ) {
switch(j) {
case 0: leds[i].r = 0; break;
case 1: leds[i].g = 0; break;
case 2: leds[i].b = 0; break;
}
FastSPI_LED.show();
delay(1);
}
}
// Fade in/fade out
for(int j = 0; j < 3; j++ ) {
memset(leds, 0, NUM_LEDS * 3);
for(int k = 0; k < 256; k++) {
for(int i = 0; i < NUM_LEDS; i++ ) {
switch(j) {
case 0: leds[i].r = k; break;
case 1: leds[i].g = k; break;
case 2: leds[i].b = k; break;
}
}
FastSPI_LED.show();
delay(3);
}
for(int k = 255; k >= 0; k--) {
for(int i = 0; i < NUM_LEDS; i++ ) {
switch(j) {
case 0: leds[i].r = k; break;
case 1: leds[i].g = k; break;
case 2: leds[i].b = k; break;
}
}
FastSPI_LED.show();
delay(3);
}
}
}
Users browsing this forum: No registered users and 7 guests