Skip to main content
Topic: Controller Board for Adafruit's Large RGB Matrix Displays (Read 177610 times) previous topic - next topic

Re: Controller Board for Adafruit's Large RGB Matrix Display

Reply #60
Louis,

Is it possible to connect  the LED matrix and an SD card to the teensy 3.1 simultaneously? It would be nice to store patterns or bitmaps on the card and read them in to display them.

Probably not, but I thought I would ask.

Re: Controller Board for Adafruit's Large RGB Matrix Display

Reply #61
It should be possible, though I haven't tried it myself. I specifically chose pins for the matrix to leave the spi (and other peripherals) pins available. There is only one spi chip select pin open. You can see the pins on the first page of this topic.

There are some others interested in loading images and animations from a sd card as well. It's something I may try to incorporate into the library, or at least provide some functions to make it easier to do.

Re: Controller Board for Adafruit's Large RGB Matrix Display

Reply #62
The SD Card access is a must..!!

Re: Controller Board for Adafruit's Large RGB Matrix Display

Reply #63
Just wanted to let everyone know that I have successfully connected an SD card interface to a Teensy 3.1 running the RGB Matrix display. Connections are simple and are shown below. No level shifters or pullup resistors are required.

 *      Hardware Connections
 *      Teensy 3.1 <------>  SD Card
 *      ------------------------
 *      3.3V output  ------  Vcc
 *        Gnd ------ Gnd
 *      pin 11 ------ MOSI or DI
 *      pin 12 ------ MISO or DO
 *      pin 13 ------ CLK
 *      pin 15 ------ CS
 *
 * NOTE: Pin 15 must be specified as the chip select in the SdFat initialization code (sd.begin statement) for the SdFat code to work

For a test I wrote two sketches. The first generated 100 unique plasma patterns on the LED matrix and saved them to individual files on the SD card. The second sketch read and displayed the 100 plasma patterns from the files.

NOTE: I had to move the readPixel method in SmartMatrix.h from the private declarations to the public declarations to make my code work.

The two sketches are available in a single zip file available at: craigandheather.net/misc/LEDMatrix_SDCard.zip if anyone is interested.

Again thanks to Louis for an incredible driver for the LED matrix


Re: Controller Board for Adafruit's Large RGB Matrix Display

Reply #65
Hi Craig,

I was unaware of your plans/progress and have spent most of the day soldering up a temporary protoboard and started working on some code myself.

[attachment=0]
 I almost had it going and sent Louis an e-mail about the progress. Louis then informed me about your progress. LOL.

I'll look into your code asap :)

I'm also going to see if I can attach a CC3000 wifi module and get that going.

Kjetil

Re: Controller Board for Adafruit's Large RGB Matrix Display

Reply #66
Hi Craig,

I was able to check out your sketches. Nice work :)

I made a couple of minor changes:
Code: [Select]
        delay(500); // was 2000
       
        fileNumber++;
        if (fileNumber == 100) {
            fileNumber = 1; // original code stopped after last file
        }
By removing the delay between each image I was also able to test the load speed. It seems like it's reaching around 20-25 frames/s on my setup (I didn't bother timing it accurately). Respectable :)

My quest has been to display BMP files both as still images (slideshows) and as animations (e.g. converted from GIF-anims). I have also spent a tiny bit on a possible config setup and planned to create a sketch in Processing to generate both the image files and config files.

You can read about my config thoughts on the Pixelmatix forum and I welcome input/critique.

Kjetil

Re: Controller Board for Adafruit's Large RGB Matrix Display

Reply #67
PixelMatrix Forums??? URL??

Re: Controller Board for Adafruit's Large RGB Matrix Display

Reply #68
Great work Craig.. It would be great to have net control over the display..  My aspirations for this would be a net and sd card enabled display controlled with a single rotary encoder as the selection control!


Re: Controller Board for Adafruit's Large RGB Matrix Display

Reply #70
Thanks Louis!!

Re: Controller Board for Adafruit's Large RGB Matrix Display

Reply #71
Just a little update.

I have been able to work a little more on my code tonight and have BMP loading up and running for both "slideshow" and animation sequences.

Getting BMP files to load was a major hassle. I was able to look up example code on the net that I based my implementation on but the BMP files would not load. The problem turned out to be that BMP files exported from Photoshop where not valid. I found a large BMP (176x176 px) from Adafruit that loaded but when scaling it down in Photoshop or Preview (Mac) the file did not load. In the end I downloaded Gimp and was able to export the files properly.

At the moment I have hardcoded the frame sequences and delays in a multi-array in the code and I will look into loading the data properly from a config file as soon as time permits - hopefully tomorrow.

Fun fact: I changed SD card and load times dropped from around 64ms to 30ms for the BMP files. I'm satisfied with a 30+ frame rate ;)

Re: Controller Board for Adafruit's Large RGB Matrix Display

Reply #72
Hi Kjetil, that's great progress!  30fps will make for some nice animations. 

Taking a look at BMP on Wikipedia shows that Photoshop adds some undocumented headers to the format, I wonder if that's where things are going wrong.  I just assumed a BMP is a BMP, but it looks more complicated than that.

Re: Controller Board for Adafruit's Large RGB Matrix Display

Reply #73
Yes, I got suspicious about Photoshop doing something funny when I noticed that the file size was 9KB…

I recorded a video of the current status on the animation/slideshow viewer: http://youtu.be/qpx4o4rUV-U

Re: Controller Board for Adafruit's Large RGB Matrix Display

Reply #74
Wow, you ran all those images through GIMP?  We're definitely going to need a scriptable commandline utility.  While I don't have time to start on this right now, you might take a look at ImageMagick