Teensy 3.2 octows2811

Status
Not open for further replies.

sjbosco

New member
I am trying to get vixen with teensy 3.2 on octows2811 for megatree.

Couple of questions. When using Arduino I could select which data pin down which strip incase I am using mega tree + arches + others.

However, when using octo2811
How do I know which wire in the ethernet cable I should connect to for mega tree, which one for arches

Mega tree runs 16 strands of ws2811 with 50 pixels each all chained as one long string

Arch 2 numbers 50 pixels each 2 strings as one chained.

Can you let me know, how do I wire them and which wire for which item

Also any working sketch of vixen mega tree for octows2811.
 
all the info you need about Octo is here https://www.pjrc.com/store/octo28_adaptor.html and her https://www.pjrc.com/teensy/td_libs_OctoWS2811.html
it looks like vixen can output using USB so check out the octo VideoDisplay example
or it can output artnet, there are a couple of artnet to octo libarys around

I have successfully setup all the components and ran sample wsocto sketches and all works fine. But now I am trying to get the Vixen Serial Com Working. Issues is I send the header and still there is nothing happening.


Code:
/*
************************  Heinz Doessegger  -  www.technikfreak.ch  ******************************

vchristmas v1.0 - Januar 2015
Dokumentation zum Projekt:
http://www.technikfreak.ch/category/technik-elektronik/technik-elektronik-projekte/technik-elektronik-projekte-weihnachtsbeleuchtung/

HARDWARE: TEENSY 3.1 / 3.2

ARDUINO PLUGIN: TEENSYDUINO mit OctoWS2811 Bibliothek
http://www.pjrc.com/teensy/td_download.html

LED: WS2811

SOFTWARE: Vixen Lights 3.x
Programm zur Steuerung von WS2811 RGB LED durch Vixen Lights 3.x http://www.vixenlights.com/
DISPLAY CONFIGURATION - COMx (x = COM Port von Arduino) 115200, None, 8 One
SEND A TEXT HEADER: VIXStart
Kanaele: Pro LED braucht es 3 Kanäle (Rot/Gruen/Blau)
Color Handling: RGB

TIPP: Fuer Einsteiger
Zum Start nur mit einer 50er LED Reihe beginnen. ledsPerStrip und PixelCount jeweils auf 50 setzen.
In Vixen Lights 50 LED Elemente anlegen und ueber das Color Handling RGB auf 150 Ausgaenge mappen.

************************  Heinz Doessegger  -  www.technikfreak.ch  ******************************
*/

#include <OctoWS2811.h>

const int ledsPerStrip = 800;              // Maximale Anzahl Pixel pro Strang
int   PixelCount = 50;                      // Effektive Anzahl Pixel
float hell = 0.50;                          // Dimmer 1.00=100% Helligkeit - 0.50=50% Helligkeit 

DMAMEM int displayMemory[ledsPerStrip*6];
int drawingMemory[ledsPerStrip*6];
const int config = WS2811_GRB | WS2811_800kHz;
OctoWS2811 leds(ledsPerStrip, displayMemory, drawingMemory, config);
int pixelValue = 0;

void setup()
{

  delay(300);
  Serial.begin(115200);                     // Geschwindigkeit der Datenuebertragung von Vixen Lights 3 zum Arduino

  leds.begin();
  for (int i=0;i<PixelCount;i++)            // Initialisierung - Einmalig leuchten alle LED blau
     {
       leds.setPixel(i, 0, 0, 200*hell);
     }
       leds.show();   
     delay (5000);  
  for (int i=0;i<PixelCount;i++)
     {
       leds.setPixel(i, 0, 0, 0);
     }
     leds.show();   
}

void loop() 
{                    
 
    if (Serial.available()>5)                // Auf Datenuebertragung von Vixen Lights warten
  {
     waitForVixenHeader();                   // Funktion aufrufen: Warten auf Startstring

  	for (int pixCount=0; pixCount<PixelCount;pixCount++)       // Do this for as many Pixels defined in PixelCount
    {
      int RGB[3];                             // Array fuer die drei RGB Farbwerte                   
      for (int color = 0;color<3;color++)     // Drei Werte bilden jeweils eine RGB LED
      {                       
        while (Serial.available() < 1)        // Auf die naechste Zahl warten
        {
          delay(10);
        }
        RGB[color] = int(Serial.read()*hell); // Farbwert dem Array zuweisen mit Helligkeitskorrektur
      }                                       // Wiederholen bis alle drei Werte eingelesen sind
          
        leds.setPixel(pixCount, RGB[1], RGB[0], RGB[2]);
      
    }                                         // Wiederholen bis alle LED eingelesen sind
    leds.show();                              // Farbmuster aktivieren   
  //pinMode(13, OUTPUT);
  //digitalWrite(13, HIGH);                          
  }                                           // Naechstes Farbmuster holen
}                                             // Schlaufen Ende

void waitForVixenHeader()
{
    char  *header="VIXStart";
    char buffer[3];
    int index = 0;

    while (true) 
    {
        int inByte = Serial.read();
        if(inByte==-1)
        {
          continue;
        }
        
        buffer[index] = inByte;
        if(buffer[index]!=header[index])
        {            
            index=-1;                     
        }
        
        buffer[index+1] = 0;              
        index++;
        if(index==8)
        {
          return;
        }
    }
}
 
Status
Not open for further replies.
Back
Top