Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 13 of 13

Thread: I need a sketch that will read and display Jinx! .dat files from a Teensy 3.6 SDcard

  1. #1

    I need a sketch that will read and display Jinx! .dat files from a Teensy 3.6 SDcard

    I have an array of 5ea. 32X8 NeoPixel Panels connected to a teensy 3.6 with a OctoWS2811 card.
    I can display Jinx generated animations, including scrolling text on the array with Glediator.ino.

    I saved a "myanim.dat" file to an SD card but I can not properly read, then display the contents on the array.

    With the sketch in https://hackaday.io/project/5714-gle...rduino/details (modified for NUM_LEDS and SD pin) I get an indication of a good read/display but it was only on a portion of the 1st panel. The sketch does not include OctoWS2811.

    Any help will be much appreciated.

    Thank you.

  2. #2
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    15,115
    We can probably help you get this running, but you have to do more. At the very least, you must post the full code you tried (even if only a slight change) and details of how your LEDs are wired. Photos are best.

  3. #3
    Paul,

    I can not find instructions about formatting code or inserting pictures for this Forum.

  4. #4
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    15,115
    Use these buttons...

    Name:  sc.png
Views: 93
Size:  8.6 KB

    To check, click "Go Advanced" or "Preview Post" to see how your message will appear.

  5. #5
    On my iMac the pjrc forum formatting menu doesn't show. I'm now on my PC.

    I was using this code to read and display a Jinx! generated 'myanim.dat' file on my 5 panel 32X8 neopixel array.

    Code:
    // Glediator Arduino UNO sketch by Jens Andrée
    // 500k bauds with 80 pixels no problem
    // sdcard stream for stand-alone operation.
    
    #include <FastLED.h>
    #include <SPI.h>
    #include <SD.h>
    
    #define NUM_LEDS 1280
    #define DATA_PIN 2
    #define CLOCK_PIN 3
    #define CMD_NEW_DATA 1
    #define BAUD_RATE 100000  //if using Glediator via serial
    
    File fxdata;
    CRGB leds[NUM_LEDS];
    
    void setup()
    {
      FastLED.addLeds<WS2811, DATA_PIN, GRB>(leds, NUM_LEDS); //se doc for different LED strips
    //  Serial.begin(BAUD_RATE); // when using Glediator via usb
      Serial.begin(115200);
      
      for(int y = 0 ; y < NUM_LEDS ; y++) 
      {
        leds[y] = CRGB::Black; // set all leds to black during setup
      }
      FastLED.show();
    
      pinMode(10, OUTPUT); // CS/SS pin as output for SD library to work.
      digitalWrite(10, HIGH); // workaround for sdcard failed error...
    
      if (!SD.begin(BUILTIN_SDCARD))
      {
        Serial.println("sdcard initialization failed!");
        return;
      }
      Serial.println("sdcard initialization done.");
      
      // test file open
      fxdata = SD.open("myanim.dat");  // read only
      if (fxdata)
      {
        Serial.println("file open ok");      
        fxdata.close();
      }
    }
    
    int serialGlediator ()
    {
      while (!Serial.available()) {}
      return Serial.read();
    }
    
    void loop()
    {
    
    // uncomment for Glediator  
    //  while (fileGlediator () != CMD_NEW_DATA) {}
    //  Serial.readBytes((char*)leds, NUM_LEDS*3);
    
      fxdata = SD.open("myanim.dat");  // read only
      if (fxdata)
        {
          Serial.println("file open ok");      
        }
    
      while (fxdata.available()) 
      {
        fxdata.readBytes((char*)leds, NUM_LEDS*3);
        FastLED.show();
        delay(20); // set the speed of the animation. 20 is appx ~ 500k bauds
      }
      
      // close the file in order to prevent hanging IO or similar throughout time
      fxdata.close();
    }
    I tried to 'Insert Image' of the display showing proper scrolling of "Jinx!" with Glediator.ino and the display I get with the above code - but - I got this with both pictures:
    Click image for larger version. 

Name:	Capture.PNG 
Views:	6 
Size:	3.2 KB 
ID:	11496
    I'll try again later with the Insert Image of my array.

  6. #6
    This video shows the proper operation of the 5 32X8 neopixel panel array..



    This is how the code in post #5 displayed the Jinx! generated myanim.dat file from the SD Card.



    Thanks for your attention.

  7. #7
    Is there any additional information I need to supply to get help with the sketch?
    I think the first video shows that the 8X32 panels were wired properly.

  8. #8
    Should be OK now.

  9. #9
    Does anyone have any ideas how to write the sketch that I need?

  10. #10
    Quote Originally Posted by OldBotBuilder View Post
    Does anyone have any ideas how to write the sketch that I need?
    I need this script for another project too. It will be a 24X90 sign display. We want to run the teensy headless because the sign will be remotely located and battery powered.

  11. #11
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    15,115
    Are there any tutorials or step-by-step instructions for using Jinx, and specifically how to get it to export these .DAT files?

    Is there any documentation about the .DAT file data format?

    I have personally never used Jinx, and honestly I just don't have time to get into it, if I were to look at this application. I would like to create an example for the OctoWS2811 library, if I could do this pretty quickly. But such an example would not be very useful (and perhaps create more questions than it helps anyone) if there isn't good info for others about how to get the .DAT file created.

  12. #12
    Paul,

    For the Jinx! User Manual (Version 2.4) go to http://www.live-leds.de/downloads/
    Should I send you the .dat file that I used for the 2nd video? It is about 4KB.

    For customers using Teensy 3.6 and OctoWS2811 to make signage from LED strips, Jinx is a very powerful 'animation/effects' generator.

  13. #13
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    15,115
    Quote Originally Posted by OldBotBuilder View Post
    For the Jinx! User Manual (Version 2.4) go to http://www.live-leds.de/downloads/
    This user manual is not enough. You didn't even manage to say which page number to read!

    I will *not* invest engineering time into writing a .DAT file player if this manual (and it's info on page 24) is all that is available to new users. There must be a step-by-step tutorial of some sort (screenshots or video). There must also be clear documentation. The manual says "Glediator2 / Solderlab UIB compatible recording files", but there is no link to documentation about this format.

Posting Permissions

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