teensy wifi artnet lights

Status
Not open for further replies.
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


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();
}
 
Here is an image of the basic setup using the cc3000 breakout board from Adafruit with the Teensy 3.0 micro controller.
teensy_battery-1024x764.jpg
This may be a bit out of date regarding the library, but changes were required to the standard pin setup to be able to use octows lib.

Both are able run off 5volt inputs if you want them to, as both have on board regulators to convert to 3.3v logic (hence using a standard 4xAA battery setup = rechargeable NOT regular batteries as these give 6v).

The hookup of the cc3000 uses the Adafruit library with some changes. The library allows for pin changes, and in order for the Teensy to run both the CC3000 wifi board and the Octows2811 library to run the led array, I had to change some of the pins to avoid conflicts.

The led array is hooked up in the usual way, using eight pins of the Teensy

https://github.com/PaulStoffregen/Ad...CC3000_Library
CLK to pin 13
MISO to pin 12
MOSI to pin 11
CS to pin 10

VBEN to pin 5
IRQ to pin 2 // and remember change the code in the standard sketch from pin 3 to pin 2 :)
 
Last edited:
Status
Not open for further replies.
Back
Top