Page 5 of 7 FirstFirst ... 34567 LastLast
Results 41 to 50 of 63

Thread: Teensy 3.2

  1. #41
    Join Date
    Oct 2017
    Location
    Slovakia
    Posts
    8
    Post Thanks / Like

    Default Re: Teensy 3.2

    I'm not using any level shifter, looks like my pixels can live with 3.3V programing signal.

    In the mean time I was able to fount my verry first .hex file, which were compiled on my computer by Arduino IDE for Teensy.
    I upload this old .hex file to the rest of the Teensys and surprisingly all 3 Teensys are eorking fine.
    So by this I would exclude any HW, cabling, sketch issue.
    There might be problem somehow with Octo library it self in my computer, but I would exclude this also, because by using octows2811 library is working wine,
    when I'm using it for "Rainbow" test sketch.

    I already re-install Arduino IDE and Teensyduino plugin, without any luck.

    I was thinking, that it might be some Arduino settings, which are used for compiling the *.hex file.
    So I tried to set different "USB Type", but without any luck.
    I have realized, that working Teensy anounce him self to Rasbian as:

    Nov 4 22:12:21 FPP kernel: [ 985.205655] usb 1-1.2: new full-speed USB device number 8 using dwc_otg
    Nov 4 22:12:21 FPP kernel: [ 985.308419] usb 1-1.2: New USB device found, idVendor=16c0, idProduct=0483
    Nov 4 22:12:21 FPP kernel: [ 985.308440] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
    Nov 4 22:12:21 FPP kernel: [ 985.308453] usb 1-1.2: Product: USB Serial
    Nov 4 22:12:21 FPP kernel: [ 985.308465] usb 1-1.2: Manufacturer: Teensyduino
    Nov 4 22:12:21 FPP kernel: [ 985.308477] usb 1-1.2: SerialNumber: 4294967295
    Nov 4 22:12:21 FPP kernel: [ 985.309964] cdc_acm 1-1.2:1.0: ttyACM1: USB ACM device
    Based on that fact, USB type should be set to Serial.

    FINALY:
    I have played with "Optimize" options and I got it
    Code_optimize.png

  2. #42
    Join Date
    Mar 2017
    Location
    Indiana
    Posts
    114
    Post Thanks / Like

    Default Re: Teensy 3.2

    That's great news! I'll add the information about the Optimize setting to my code's comments in case anyone else runs into this.
    Halloween 2019 Lights: https://youtu.be/QbNE1x21gqA
    Christmas 2018 Lights: https://youtu.be/pkcxuiiSdhc

    Other shows and behind the scenes:
    https://www.youtube.com/channel/UCg1...c85-wgbnkNiLOw

  3. #43
    Join Date
    Dec 2017
    Posts
    1
    Post Thanks / Like

    Default Re: Teensy 3.2

    So with fpp i seem to be capped at 3072 channels, is that correct?

    This can obviously drive way more than that, do you think theres any way around that limitation?

    Just curious. Ive got everything else working, really appreciate the code.

    Wasnt thinking i would get to put them up this year but looks like ill be attaching 4 5m strips to the front of my house this weekend!

  4. #44
    Join Date
    Nov 2016
    Location
    Washington State
    Posts
    179
    Post Thanks / Like

    Default Re: Teensy 3.2

    Here is an octo/teensy sketch I swear bye
    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 = 512;              // Maximale Anzahl Pixel pro Strang
    int   PixelCount = 4096;                      // 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                             
      }                                           // 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;
            }
        }
    }

  5. #45
    Join Date
    Nov 2017
    Posts
    46
    Post Thanks / Like

    Default Re: Teensy 3.2

    I Just tried the sketch with my vixen sending headers. However, there seems to be no activity happening. I've tried the octows2811 examples all work fine.

    What do you think I should be missing.

  6. #46
    Join Date
    Nov 2009
    Location
    Morrisburg, On, Canada
    Posts
    2,540
    Post Thanks / Like

    Default Re: Teensy 3.2

    Quote Originally Posted by SJBosco View Post
    I Just tried the sketch with my vixen sending headers. However, there seems to be no activity happening. I've tried the octows2811 examples all work fine.

    What do you think I should be missing.
    Are you sure you used the correct case sensitive header?

  7. #47
    Join Date
    Nov 2017
    Posts
    46
    Post Thanks / Like

    Default Re: Teensy 3.2

    Verified exact VIXStart. Matching baud bits parity.

  8. #48
    Join Date
    Nov 2017
    Posts
    46
    Post Thanks / Like

    Default Re: Teensy 3.2

    I have wired Orange to Data and Orange White to GND. Examples work not Vixen. Below is another version of Sketch I tried with no luck.

    Code:
    /* OctoWS2811 BasicTest.ino - Basic RGB LED Test
    http://www.pjrc.com/teensy/td_libs_OctoWS2811.html
    Copyright (c) 2013 Paul Stoffregen, PJRC.COM, LLC
    
    Permission is hereby granted, free of charge, to any person obtaining a copy
    of this software and associated documentation files (the "Software"), to deal
    in the Software without restriction, including without limitation the rights
    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
    copies of the Software, and to permit persons to whom the Software is
    furnished to do so, subject to the following conditions:
    
    The above copyright notice and this permission notice shall be included in
    all copies or substantial portions of the Software.
    
    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
    THE SOFTWARE.
    
    Required Connections
    --------------------
    pin 2: LED Strip #1 OctoWS2811 drives 8 LED Strips.
    pin 14: LED strip #2 All 8 are the same length.
    pin 7: LED strip #3
    pin 8: LED strip #4 A 100 ohm resistor should used
    pin 6: LED strip #5 between each Teensy pin and the
    pin 20: LED strip #6 wire to the LED strip, to minimize
    pin 21: LED strip #7 high frequency ringining & noise.
    pin 5: LED strip #8
    pin 15 & 16 - Connect together, but do not use
    pin 4 - Do not use
    pin 3 - Do not use as PWM. Normal use is ok.
    
    This test is useful for checking if your LED strips work, and which
    color config (WS2811_RGB, WS2811_GRB, etc) they require.
    */
    
    #include <OctoWS2811.h>
    
    #define NUM_LEDS 800
    const int ledsPerStrip = 50;
    //const int ledsPerStrip = 100;
    
    DMAMEM int displayMemory[ledsPerStrip * 6];
    int drawingMemory[ledsPerStrip * 6];
    
    const int config = WS2811_RGB | WS2811_800kHz;
    int menu = 2;
    //OctoWS2811 leds(ledsPerStrip, displayMemory, drawingMemory, config);
    OctoWS2811 leds(ledsPerStrip, displayMemory, drawingMemory, config);
    
    void setup() {
    delay(2000);
    leds.begin();
    leds.show();
    // Define the speed of the serial port
    
    
    }
    
    #define RED 0x160000
    #define GREEN 0x001600
    #define BLUE 0x000016
    #define YELLOW 0x161600
    #define PINK 0x161088
    #define ORANGE 0xE05800
    #define WHITE 0x161616
    
    void loop() {
    
    // Set some counter / temporary storage variables
    int cnt;
    unsigned int num_leds;
    unsigned int d1, d2, d3, d4;
    byte r,g,b;
    
    if (menu == 1) {
    for (int i = 0; i < leds.numPixels(); i++) {
    leds.setPixel(i,leds.color(0,0,64));
    }
    leds.show();
    
    delay(500);
    
    for (int i = 0; i < leds.numPixels(); i++) {
    leds.setPixel(i,leds.color(64,0,0));
    }
    leds.show();
    delay(500);
    
    
    for (int i = 0; i < leds.numPixels(); i++) {
    leds.setPixel(i,leds.color(0,64,0));
    
    }
    leds.show();
    delay(500);
    }
    
    
    Serial.begin(115200);
    delay(2000);
    // Begin an endless loop to receive and process serial data
    for(;;) {
    // Set a counter to 0. This couter keeps track of the pixel colors received.
    cnt = 0;
    //Begin waiting for the header to be received on the serial bus
    //1st character
    while(!Serial.available());
    if(Serial.read() != '>') {
    continue;
    }
    //second character
    while(!Serial.available());
    if(Serial.read() != '>') {
    continue;
    }
    //get the first digit from the serial bus for the number of pixels to be used
    while(!Serial.available());
    d1 = Serial.read();
    //get the second digit from the serial bus for the number of pixels to be used
    while(!Serial.available());
    d2 = Serial.read();
    //get the third digit from the serial bus for the number of pixels to be used
    while(!Serial.available());
    d3 = Serial.read();
    //get the fourth digit from the serial bus for the number of pixels to be used
    while(!Serial.available());
    d4 = Serial.read();
    //get the end of the header
    while(!Serial.available());
    if(Serial.read() != '<') {
    continue;
    }
    while(!Serial.available());
    if(Serial.read() != '<') {
    continue;
    }
    // calculate the number of pixels based on the characters provided in the header digits
    num_leds = (d1-'0')*1000+(d2-'0')*100+(d3-'0')*10+(d4-'0');
    // ensure the number of pixels does not exceed the number allowed
    if(num_leds > NUM_LEDS) {
    continue;
    }
    // Let the FastLED library know how many pixels we will be addressing
    // OctoWS2811 leds(ledsPerStrip, displayMemory, drawingMemory, config);
    // Loop through each of the pixels and read the values for each color
    do {
    while(!Serial.available());
    r = Serial.read();
    while(!Serial.available());
    g = Serial.read();
    while(!Serial.available());
    b = Serial.read();
    leds.setPixel(cnt,r,g,b);
    cnt++;
    } 
    while(--num_leds);
    // Tell the FastLED Library it is time to update the strip of pixels
    leds.show();
    // WOO HOO... We are all done and are ready to start over again!
    }
    
    }

  9. #49
    Join Date
    Nov 2017
    Posts
    46
    Post Thanks / Like

    Default Re: Teensy 3.2

    Below is the only warning while compiling I have tried the same with const as well.

    vchristmas_v_1_0: In function 'void waitForVixenHeader()':
    vchristmas_v_1_0:94: warning: ISO C++ forbids converting a string constant to 'char*'
    char *header="VIXStart";

  10. #50
    Join Date
    Nov 2013
    Posts
    20
    Post Thanks / Like

    Default Re: Teensy 3.2

    The code is for 0000s LEDS. Max LEDs defined is 800 therefore change code for 000s;



    unsigned int d1, d2, d3;


    //get the first digit from the serial bus for the number of pixels to be used while(!Serial.available()); d1 = Serial.read(); //get the second digit from the serial bus for the number of pixels to be used while(!Serial.available()); d2 = Serial.read(); //get the third digit from the serial bus for the number of pixels to be used while(!Serial.available()); d3 = Serial.read(); // //get the end of the header while(!Serial.available()); if(Serial.read() != '<') { continue;


    // calculate the number of pixels based on the characters provided in the header digits num_leds = (d1-'0')*100+(d2-'0')*10+(d3-'0');

    Set header in Vixen to >>800<<

    Code works great running vixen with Octo and USB to laptop.

Page 5 of 7 FirstFirst ... 34567 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •