Hi
i am trying to light a RGB LED that is connected to the WS2803, but it just won't work.
I am using the WS2803Single Library (http://forum.arduino.cc/index.php?topic=89104.msg670527#msg670527) and i connected the pins like shown in the attached file.(Power supply is 5 Volts and 3A max)
The code is the following(adapted the example in the library to my pins):
#include "SPI.h"
#include "WS2803Single.h"
/*****************************************************************************
Example sketch for driving WS2803 chips running single LED pixels
*****************************************************************************/
// Choose which 2 pins you will use for output.
// Can be any valid output pins.
// The colors of the wires may be totally different so
// BE SURE TO CHECK YOUR PIXELS TO SEE WHICH WIRES TO USE!
//int dataPin = 2;
//int clockPin = 3;
int dataPin = 8;
int clockPin = 9;
int ledCount = 3;
// Don't forget to connect the ground wire to Arduino ground,
// and the +5V wire to a +5V supply
// Set the first variable to the NUMBER of pixels. 25 = 25 pixels in a row
WS2803Single strip = WS2803Single(ledCount,dataPin, clockPin);
// Optional: leave off pin numbers to use hardware SPI
// (pinout is then specific to each board and can't be changed)
//WS2803Single strip = WS2803Single(ledCount);
void setup() {
strip.begin();
Serial.begin(19200);
//Serial.println(strip.bufferSize,DEC);
// Update LED contents, to start they are all 'off'
strip.show();
}
void loop() {
//--- light up all LEDs one at a time
for (int i = 0 ;i < ledCount ; i++){
if (i > 0){
strip.setPixelColor(i-1,0);
} else {
strip.setPixelColor(ledCount-1,0);
}
strip.setPixelColor(i,255);
strip.show();
delay(100);
}
// Fade up the final LED
for (int j = 0 ;j < 255 ; j++){
strip.setPixelColor(ledCount-1,j);
strip.show();
delay(500);
}
delay(200);
}
I also tried searching the forum, but i couldn't find anything. The most promissing thing i found was this: Arduino/Teensy: LedPWM-Driver WS2803 Problem - Mikrocontroller.net
Does anyone have expierence on how to wire this thing up, so i can light it up?
Thanks for helping!