Hallo,
ich versuch gerade mal das FastSPI example zum laufen zu bringen aber so richtig will nichts leuchten.
Ist erstmal nur ein ganz simpler funktionscheck.
script sieht so aus. kann mir jemand sagen wo mein fehler liegt?
die ausgabe von "setup" und "loop" funktioniert.
#include <FastSPI_LED.h>
#define NUM_LEDS 20
// 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 13
int colorSetted = 0;
void setup()
{
Serial.begin(9600);
FastSPI_LED.setLeds(NUM_LEDS);
FastSPI_LED.setChipset(CFastSPI_LED::SPI_LPD8806);
FastSPI_LED.setCPUPercentage(50);
FastSPI_LED.setPin(PIN);
FastSPI_LED.init();
FastSPI_LED.start();
leds = (struct CRGB*)FastSPI_LED.getRGBData();
Serial.println("Setup");
}
void loop()
{
if(colorSetted == 0)
{
Serial.println("loop");
for(int i=0; i<NUM_LEDS; i++)
{
leds[i].r = 127;
leds[i].g = 0;
leds[i].b = 0;
}
FastSPI_LED.show();
colorSetted = 1;
}
}