Shop OBEX P1 Docs P2 Docs Learn Events
Propellering the Adafruit 16x32xRGB LED array - Page 4 — Parallax Forums

Propellering the Adafruit 16x32xRGB LED array

124»

Comments

  • WBA ConsultingWBA Consulting Posts: 2,934
    edited 2012-09-25 11:46
    Happened to see this thread yesterday and have a few comments:
    1. Ray: Fantastic job on your write up on your site. The level of detail in your explanations is truly amazing and helped me to understand a few things outside of this display.
    2. You mentioned having a tough time taking pictures of LED displays. When we had a project at work that utilized mass amounts of high power RGB LEDs, I used a slower exposure speed on the camera to capture a clean image. Rather than 1/500 that the auto mode would use, I set it to 1/20 and kept the camera stabilized.
    3. You should bring the setup to the expo so that it can be utilized as a message board for upcoming speakers, etc
    keep up the good work!
  • RaymanRayman Posts: 14,646
    edited 2012-09-26 12:31
    Andrew, Thanks!

    Tim, Prop2 would definitely allow you to do a whole lot more... I can do a pretty good job with 6 panels and specially prepared images.

    But, I bet the Prop2 will be able to decode video in real time and display on a jumbotron size panel...
  • tdg8934tdg8934 Posts: 126
    edited 2013-01-13 03:04
    Has anyone done anymore developing with these displays lately?

    I'm trying to put together a slideshow or effect display with (2) 16x32 making it basically (1) 32x32 display. My wife is doing a presentation on "coffee" for a ladies group for our church. I have found some 32x32 icons I saved as 24 bit BMPs and used Rayman's 6 display code but this only works for 4 bit BMPs (16 colors). Converting the BMPs with MS Paint from 24 bit to 4 bit didn't make them look so good on the display. I saw the other version he had that loaded and flipped BMPs with delays between them and that worked good but could only show 2-3 24 bit BMPs before I ran into an out of memory (or LONGs) issue. So far from what I can see, I would either have to find some 16 color "Coffee" related 32x32 BMPs and scroll them as one long BMP (Like the XMAS or New Years icons / message he has) or settle with 2-3 24bit BMPs flipping with 3-5 second delays between showing each one. This may be ok but I would like to show more than just 2-3 BMPs. Can they be loaded into my SD card? Has anyone done this with code they can share? I would also like to initially scroll a message across (preferably as a 2nd COG overlayed on the flipping 24bit BMPs but that may be too much to be asking for. For now I would like to see if anyone has any code to share that can do anything remotely like what I was asking.

    Thank you,

    Tim
  • RaymanRayman Posts: 14,646
    edited 2013-01-13 04:12
    Try using the free tool "Irfanview" to reduce the color depth... It does a better job that Paint, which doesn't try at all to pick the best 16 colors...
  • tdg8934tdg8934 Posts: 126
    edited 2013-01-13 16:25
    Rayman,

    That program worked great! Exactly what I needed. Pictures are not perfect but 100% better than what MS Paint could do for 24 bit to 4 bit color reduction. I also loved the Panoramic Image creation menu item. Great for scrolling a few pictures on by. Finished the project pretty easily with your example coding.

    Thanks again!

    Tim
  • RaymanRayman Posts: 14,646
    edited 2013-01-13 16:35
    Glad that worked... Photoshop is actually the best at depth reduction. I think you can download the old CS2 for free now... (see Geek.com).
  • tdg8934tdg8934 Posts: 126
    edited 2013-02-11 08:24
    I have ordered 2 more displays (4 total) - notice the cost has been almost cut in half to $45. I am using smaller sized upright shelving brackets (24" cut down with a hacksaw to fit to 2 displays). I wil have to find a way to attach the 2 x 2 displays but that shouldn't be hard (32x64). I was not able to order the longer IDC cables on Ebay either but ordered 4 (20") ones from Pololu for $20 including shipping. Should be fun this week.

    Tim
  • RaymanRayman Posts: 14,646
    edited 2013-02-11 13:25
    Lower price is nice. Hope they actually come back in stock...
  • tdg8934tdg8934 Posts: 126
    edited 2013-02-20 05:28
    Rayman,

    They are back in stock this morning.

    http://adafruit.com/products/420

    Be carefull though from the 3 times I have ordered over the year, I have received slightly different versions of the board. Now they are a bit thinner which makes it a little harder to line up next to older versions a bit thicker. The last ones I bought went back to the Vcc and Ground posts with screws as the original was. I did not get any of the cool magnetic posts this time either as I only did on my 2nd order from them. Slight variations but they work the same for the most part. The colors seem to be a hair off too but not too noticeable from a distance.

    Tim
  • tdg8934tdg8934 Posts: 126
    edited 2013-07-31 07:46
    Has anyone seen this great tutorial from Adafruit on using (18) of the 16x32 RGB displays in a 96x96 (2' x 2') wall display?

    http://learn.adafruit.com/adafruit-diy-led-video-wall

    Sounds very cool but should be ~$1200 to build.

    Tim
  • RaymanRayman Posts: 14,646
    edited 2013-07-31 09:35
    Very interesting... I think my 1 foot x 2 foot display with Propeller could do video from SD card. They have it getting video from HDMI source there, which is interesting, but I'm not sure it's worth the trouble. Most displays I've seen are doing a looping video... Still, something to think about...
  • Adam WieslerAdam Wiesler Posts: 81
    edited 2013-07-31 16:33
    I find the HDMI/DVI interface to be really neat because I do a lot of work in my high school's theater, which means most of our content comes from a computer or a video source that can be linked to the rest of the system (lights, projectors, sound effects, props, etc.). I would love to see somebody be able to get a prop (or a prop 2) to take low resolution video from a source, and output it to these panels. While I could interface the propeller with the system, keeping the content on the propeller, this would add another layer of complication to the system if i were to use it. This is just only one application where having these act as a dumb display would be useful.

    Also, I thought I would point everybody to this store: http://www.aliexpress.com/store/701799
    The christmas light community has been using his leds for a couple of years now, and I have used a lot of them for various projects. He sells panels that look to be similar to the adafruit panels, at a very good price.
  • RaymanRayman Posts: 14,646
    edited 2013-07-31 17:28
    USB connection might be fast enough to pipe video to my 6-panel array... DVI/HDMI decoder would be very complicated here... (Would be easy to connect to a 5" LCD touchscreen though)
  • RaymanRayman Posts: 14,646
    edited 2013-07-31 17:29
    PS: Why don't my "return" or "enter" buttons work when typing in this forum anymore? It's really bothering me...

    (just figured out I had to hit the "compatability view" button in IE to make enter work...)
  • RaymanRayman Posts: 14,646
    edited 2013-10-31 14:44
    Just thought about doing something with my 32x96 RGB array for Holloween this morning...
    Found some scarry looking eyes on the web and put the thing up in an upstairs window...
    Not sure what it will look like at night, but maybe it works:
    eyes_photoB.jpg
    1024 x 698 - 60K
  • aerostaraerostar Posts: 2
    edited 2014-11-30 22:41
    I know this is very old thread. I do not really understand spin, but i am trying to code this piece in C. I am just able to get one character to display at the moment.
    .
    .
    .
    .
    char mychar[9] = {0x04, 0x00, 0x44, 0x7E, 0x40, 0x00, 0x00, 0x00, 0x00}; // Code for char 1
    .
    .
    .
    .
    for(int s = 0; s < 8; s++)//CONTROLS THE ROWS
    {
    //set the row
    MatA = ((s) >> 0) & 0x01;
    MatB = ((s) >> 1) & 0x01;
    MatC = ((s) >> 2) & 0x01;
    MatD = ((s) >> 3) & 0x01;
    MatEN = 0x01;

    for(int x = 0; x < (mychar[0]+1); x++)//CONTROLS THE COLUMNS
    {
    MatG1 = ((mychar[x+1]) >> (s)) & 0x01;
    MatB1 = ((mychar[x+1]) >> (s)) & 0x01;
    /*clock in the data*/
    MatCLK = 0x01;
    MatCLK = 0x00;
    //MatR1 = 0;
    }
    MatG1 = 0x0;
    MatB1 = 0x0;
    for (unsigned int b = 0; b < 20; b++)
    {
    MatCLK = 0x01;
    MatCLK = 0x00;
    }

    MatLAT = 0x01;
    //delay_us(1);
    MatLAT = 0x00;
    MatEN = 0x00;
    for (unsigned int b = 0; b < 100; b++)
    {
    delay_ns(10);
    }
    }

    I also have problem with the ghost thingi. Please does anyone have a c code for this piece? I am using PIC (well yes pic microcontroller)...
  • whickerwhicker Posts: 749
    edited 2014-12-01 11:57
    aerostar:

    the order in which you do things matters.

    I am guessing you have the previous columns' pixels latched in, then you change the row, but the lights are still on from the previous row.

    pay attention to the polarity of ENable and when you ENable.

    No C code, but what you have works, just not quite in the right order.
  • aerostaraerostar Posts: 2
    edited 2014-12-02 12:54
    whicker wrote: »
    aerostar:

    the order in which you do things matters.

    I am guessing you have the previous columns' pixels latched in, then you change the row, but the lights are still on from the previous row.

    pay attention to the polarity of ENable and when you ENable.

    No C code, but what you have works, just not quite in the right order.

    for(int s = 0; s < 8; s++)//CONTROLS THE ROWS
    { //set the row
    MatEN = 0x01;/////moving this to the top killed the ghosts
    MatA = ((s) >> 0) & 0x01;
    MatB = ((s) >> 1) & 0x01;
    MatC = ((s) >> 2) & 0x01;
    MatD = ((s) >> 3) & 0x01;

    Haha, Thanks a million. I have lost all my ghosts. Just by Disabling the chip before changing the row.
    Thanks.
  • DrededDreded Posts: 4
    edited 2015-01-13 16:49
    Hey all I am trying to get Rays excellent 16x32 matrix driver to display a 4x6 font but cant for the life of me do it pretty much because I do not understand the assembly at all I have searched everywhere for a pasm tutorial to at least get me started but not having much luck

    I found a 4x6 ascii font an example character: byte $6a,$aa,$c0 '0' - chr 48

    the code from Rays code that reads and displays the character for a 5x7is here:
    PUB DrawLimitedC(x,y,c,fore,back,xmin,xmax)|z,i,j
      SetCommand(DrawLimitedChar,@x)
    
    PRI setcommand(cmd, argptr)
    
        command := cmd << 16 + argptr                       'write command and pointer
        repeat while command                                'wait for command to be cleared, signifying receipt
    
    DAT DrawLimitedChar_  'draw a character at given x and y but limit to xmin, xmax
                  mov       t3,#7
                  call      #GetArgumentsSub
       'arg0=x0
       'arg1=y0
       'arg2=char
       'arg3=fore color
       'arg4=back color
       'arg5=xmin
       'arg6=xmax
       
                  mov       t9,#6
                  mov       x1,arg0
                  mov       t12,AsmPFont5x8
                  add       t12,arg2
                  rol       arg2,#2
                  add       t12,arg2
    DLC_xLoop              
    
                  cmp       x1,arg5 wz,wc
            if_b  jmp       #DLC_xLoopEnd
                  cmp       x1,arg6 wz,wc
            if_a  jmp       #DLC_xLoopEnd
                  mov       t11,#8
                  mov       y1,arg1
    
                  rdbyte    t10,t12              
    DLC_yLoop
                  ror       t10,#1 wc  
                  mov       pixelc,arg4
            if_c  mov       pixelc,arg3
                  cmp       t9,#1  wz,wc  'last column?
            if_e  mov       pixelc,arg4  
                  mov       pixelx,x1
                  mov       pixely,y1
                  call      #SetPixelSub
    
                  add       y1,#1
                  djnz      t11,#DLC_yLoop
    
            
                  
    DLC_xLoopEnd
                  add       x1,#1
                  add       t12,#1
                  djnz      t9,#DLC_xLoop 
                                'all done
                  jmp       #loop
         
    DLC_LastLine              
    
          
    

    also on a side note I also cannot get the Dec, hex, String and Print functions to display anything most likely because I am unsure of how to change the colors so its probably trying to display in black
  • RaymanRayman Posts: 14,646
    edited 2015-01-14 05:15
    The colors are defined in the "graphics" driver here:

    colors[0]:=yellow
    colors[1]:=dk_blue
    forecolor:=colors[0]
    backcolor:=colors[1]

    The colors selection is copied from the Parallax TV/VGA text drivers...
    There are 8 possible foreground/background combinations.
    As you can see above, only the "0" option is defined. If you want other colors, you could either modify the code above or define the other color sets.
    You pick a different color set using either "print" or "out" with the $0C option.
    Again, this is all a mostly direct copy from the standard Parallax text drivers.

    As for the assembly, I'll try to help...
    The Adafruit font used here is called 5x7, but really we're doing it as 6x8.
    This has the advantage that every column of pixels is one byte.
    You may have trouble adapting this code to your font because of this.
    If your font was one byte for every column, it'd be much easier.
    Then, you'd probably only have to change the initial value of the loop variables...
    You can tell by these lines:
    djnz t11,#DLC_yLoop
    djnz t9,#DLC_xLoop

    That t11 is the y loop variable and t9 is the x loop variable.
  • DrededDreded Posts: 4
    edited 2015-01-14 20:27
    appreciate the help but I already knew the command to change colours is $0C what I don't know is how to send the colour... is it supposed to be out($0C led#red,led#yellow) or out($0C) out(led#red) out(led#yellow) which of course neither work but there is no obvious way to me to pass the colour to the command. I am sure its pretty simple but since I haven't worked with many propeller programs its greek to me :p and im finding it a bit tough to learn because when I come across a great tutorial all the links are dead or the code is only half written(like the nuts n volts magazine) and it says just plunk in such and such file to finish and there is no repository for the file.... I spent 2 hours last night writing(copying by typing) a simple pasm program that was in nuts n volts only to find out when done all the building blocks where not in the article and they expect you to have a disk or something with the code.

    yea a tried changing the font to my font and then changing the iteration counts to the correct values but that just produced gibberish... ill probably work on getting my font to display with spin then convert that to PASM for speed as it will be easier for me to wrap my head around what needs to be done that way.
  • RaymanRayman Posts: 14,646
    edited 2015-01-15 08:52
    you change color sets by sending first $0C and then the next byte is the color set #.
    This has to be in the range 0..7.

    But, be aware that only color set #0 is defined in the example code.
    See my last post for where to change the colors of color set #0 and where you can define additional color set colors...

    Yes, starting with Spin is what I would do too.

    An easy way would be to redefine your font data so that there is one byte for every pixel column...
    Then, you could easily modify the example assembly code.
    But, that does waste font memory...
  • DrededDreded Posts: 4
    edited 2015-01-16 00:11
    Well I got my smaller font to work sort of... i made my 3x5 font a 3x7 and just didn't iterate over the last two columns its certainly not pretty but I cannot for the life of me figure out where the code is reading what size each individual character is.. anyhow I only needed the numbers smaller for a clock im making so I just modified the numbers and made a seperate function to make it work... so in the middle of the 5x7 characters I have my 3x5 numbers :p I tried doing a seperate font but for whatever reason if I named the font anything other than font5x8 it produced junk(and yes I changed the variable names etc)

    So if your curious this is all for a pong clock im working on here is what I have so far... https://www.youtube.com/watch?v=k5_pWMEI-ec&feature=youtu.be

    its hard to see in the video but the top green line turns blue to signify seconds in 2 second intervals
  • RaymanRayman Posts: 14,646
    edited 2015-01-16 03:34
    If it's a small number of characters, you could also make them 4-bit bitmaps and just show them that way.
    I'd guess there's enough memory to keep 10 of those in RAM...
  • Halloween again - (4) Adafruit 16x32 RGB displays with Rayman's drivers.


  • CreeCree Posts: 132
    edited 2016-10-15 22:34
    Hi everyone.

    I know this an old thread, but I am having difficulty trying to program the 16x32 LED matrix in c++.

    This is the atempt (*Link)to translate my code from the spin code that exists for the propeller with spin2cpp program, but was unsuccessful.

    I am planning to use the matrix for a game i programmed in c++.

    Can anyone plz help?

    --Chris.
Sign In or Register to comment.