Hello, I was researching a bit WS2801 and apparently this can comunicarce by Port I2c,
I would like to know which port is the fastest, and if anyone has been able
make the communications of I2C port.
I have developed a code, parececido one who had created for this I worked SPI.
but I can not run with the wire library
#include <Wire.h>
#define nLEDs 18
byte ledBar[nLEDs]; // Array representing LED PWM levels (byte size)
void setup()
{
Wire.begin(); // join i2c bus (address optional for master)
}
byte x = 255;
void loop()
{
for(int i = 0; i < nLEDs; i+=3){
ledBar[i] = x ;
ledBar[i+1] = x ;
ledBar[i+2] = x ;
}
loadWS2803(); // device address is specified in datasheet
}
void loadWS2803(){
for (int wsOut = 0; wsOut < nLEDs; wsOut++){
// shiftOut(ws2803_dataPin, ws2803_clockPin, MSBFIRST, ledBar[wsOut]);
Wire.write(ledBar[wsOut]); // sends instruction byte
}
delayMicroseconds(600); // 600us needed to reset WS2803s
}