Dahlberg77
Member
Hello everyone, I have made a WS2812 matrix that runs with Glediator i have a working code for using serial cable (usb). now I would like to add a CC3000 wifi module to make the matrix wireless, and use an artnet protocol. I am not quite sure how to acheive that!
Also I am not sure how to wire the wifi module to the teensy and on to the matrix.
hope someone can help me.
-Colin
Also I am not sure how to wire the wifi module to the teensy and on to the matrix.
hope someone can help me.
-Colin
Code:
#include "FastLED.h"
#define NUM_LEDS 480
#define COLOR_ORDER RGB
const int dataline = 13;
byte colourStore[NUM_LEDS *3];
//this is a 1D array, just set out as below for easy reading
int guitarLeds[] = {
4,5,6, //3
26,27,28,29,30,31,32, //7
50,51,52,53,54,55,56,57, 65,66,67,68, //12
73,74,75,76,77,78,79,80,81,82,83, 87,88,89,90,91,92,93,94, //19
97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119, //23
120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140, //21
144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164, //21
168,169,170,171,172,173,174,175,176, 181,182,183,184, 188, //14 //120
192,193,194,195,196,197 ,199,200,201, 205,206,207,208, //13
216,217,218,219,220,221 ,223,224,225, 229,230,231,232, //13
240,241,242,243,244,245 ,247,248,249, 253,254,255,256, //13
264,265,266,267,268,269 ,271,272,273, 277,278,279,280, //13 //172
288,289,290,291,292,293,294,295,296, 301,302,303,304, 308, //14
312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332, //21
336,337,338,339, 342,343,344,345,346,347,348,349,350,351,352,353,354,355,356, //19
361,362,363,364,365,366,367, 369,370,371,372,373,374,375,376,377,378,379,380,381, //20
385,386,387, 390,391, 393,394,395 ,399,400,401,402,403,404,405, //15
410,411, 414,415,416,417, 425,426,427, //9
434,435,436,437,438,439,440, //7
460,461,462, //3
};
CRGB leds[NUM_LEDS];
void setup() {
Serial.begin(115200);
LEDS.addLeds<WS2812B, dataline>(leds, NUM_LEDS);
}
int serialGlediator() {
while (!Serial.available()) {}
return Serial.read();
}
void loop() {
while (serialGlediator() != 1) {}
for (int i=0; i < NUM_LEDS; i++) {
leds[i].r = serialGlediator();
leds[i].g = serialGlediator();
leds[i].b = serialGlediator();
}
for(int x=0;x<280;x++)//change to your actual led number
{
leds[x]= leds[guitarLeds[x]];
}
FastSPI_LED.show();
}