Help getting going with logi-matrix

Hi there,

I've been trying unsuccessfully for a few weeks now to get going with using the LOGI Bone and a 16x32 RGB LED matrix I picked up from Adafruit, so I figured it was time to reach out here and see if anyone could help get me going.

The basic problem I'm having is that when I get to the step where I try to run the Python script, nothing seems to happen- although the script seems to run fine, the RGB matrix stays perfectly blank.  At this point, I'm looking for any help that could point me in the right direction- I'm not exactly sure how to properly troubleshoot this type of issue or narrow down where I should go next.  Maybe I missed a step, or maybe there's an issue with some of the code I'm running?

I'll try to detail the steps that got me to this point (again, largely taken from the discussion started by @jakekarnes42 and followed up by @jpiat):
  1. Follow the Quickstart tutorial
    1. Connect the BBB and LOGI Bone
    2. Write the pre-configured, latest LOGI Bone Ubuntu image to an 8GB micro SD card
    3. Connect the BBB via ethernet to my local network
    4. Power up the BBB while holding down the "Boot" button
    5. Once it's up on the network, I SSH in to the BBB using the ubuntu / temppwd credentials
    6. Run the script by doing
      cd ~/logi-tools
      sudo ./
    7. Everything looks okay- so run sudo shutdown -r now
    8. SSH into the BBB again, this time
      cd ~/logi-apps/blink_led_app
      sudo ./
    9. Get a successful message and can see that the LEDs on the LOGI Bone are now blinking.
  2. Create the bit file using this code (correctly, as far as I can tell- I get no errors in Xilinx ISE) and copy it over to the home directory on the BBB
  3. Also, clone and checkout the master branch from the logi-projects repository so that the base directory of the repository is located at /home/ubuntu/logi-projects on my BBB.
  4. Connect a 16x32 RGB LED matrix to the LOGI Bone using these instructions from Glen Akins' tutorial
    1. I know that the tutorial and code is for a 32x32 matrix- I actually have two 16x32 panels that I've tested this entire process with chained together, as well as using just one 16x32 panel).  
    2. Also, I'm using this PCB board ordered from OSH Park, so my connections go LOGI Bone -> PCB -> Ribbon Cable -> 16x32 LED Matrix Panel (-> Ribbon Cable -> 16x32 LED Matrix Panel), parentheses indicate whether I'm testing with just one or both 16x32 panels.
  5. Load the bit file from Step 2 by doing
    sudo logi_loader ./logibone_mat.bit
  6. Connect power to the LED panel(s) (again, the same way as Glen Akins demonstrates in his tutorial)
  7. Then run the Python test script...... 
    cd ~/logi-projects/logi-matrix/sw
  8. Nothing happens :(
Any tips on where to go from here?  I'm not very familiar with troubleshooting this type of problem- I'm a software engineer and I can debug my way through most software issues, but this one has me completely stuck at the moment.

I'm perfectly happy to try extra steps and provide additional details on any part of my setup, so please let me know if there's something additional I can provide in order to be helpful.

Thanks very much,

PS- I've been able to successfully run the scripts located in both the logi-apps/blink-led-app and logi-apps/wishbone directories.  I've also successfully loaded the logi-projects/logi-blink-led/bitfiles/logibone_r1_blink.bit file using the logi_loader tool.  I mention this only to demonstrate that I am able to get some things working correctly, so hopefully this indicates my Ubuntu installation is working properly :)
PPS- I've also tested each of the 16x32 RGB LED Matrix panels using an Arduino Uno and some instructions I found over at Adafruit.  So at the very least, I know that the panels aren't faulty.


  • Hi,

    what version of the logibone are you using (v1.1 or v1.5) ? I'll have a look at the project and let you know if i notice anything that could prevent the project to work for you.
  • edited October 2015
    Hi @jpiat ,

    Thanks for getting back so soon! What's the best way to determine the logibone version- is that something I can check in the shell, or would there be something on the physical board itself that would indicate its version?

    EDIT: I didn't have the board in front of me when I first replied- I see now that "LOGI-Bone R1.0" is printed on the top.
  • Hi @jpiat ,

    Were you able to look into this since I provided the version of my logibone?

  • Hi,

    i'am testing as we speak. I noted that the Matrix address in the python script is set to 0x400 while the VHDL maps the matrix at 0x0000. Can you do this modification in the .py  file and test ?
  • Hi @jpiat ,

    Sorry it took so long to reply- that seems to have been the issue.  Once I modified the .py file's matrix address to 0x0000 it started working!  Thanks so much for your help!

    For others that may have this same problem, the solution was to alter the MAT_ADDR constant variable at the beginning of the file that was previously being set as this:
    MAT_ADDR = 0x0400

    to this:
    MAT_ADDR = 0x0000

    One last quick question, if I may- I'm hoping to eventually output text to these LED panels (the goal is to be able to scroll, blink, etc., but first things first- just print something out).  Do you have any suggestions as to what I might look into (Python libraries, concepts, etc.) that would help me in achieving this type of functionality.

    Thanks again!
  • The python example that is provided in the project repository contains a function to write the frame buffer. This function works with a 32x32 panel but should be easy to mod for a 32x16 panel. To generate text on the matrix, you'll need to generate store the fonts somewhere and then copy the fonts to the panel using the aforementioned function. I can help with that
  • So, from what I can garner from reading the code, here's what I'm seeing:
    • Assuming a 32 x 32 panel, there are 1024 pixels (obviously)
    • The bufferFromPixels function expects an array of length up to 1024.  And creates a frame buffer of length 2048 (1024 * 2).
    • Buffer array indices (starting at 0), i and i + 1, are pairs created from the same value, p, of the input array.  Respectively, p & 255 and p >> 8.
    • Each value in the input array corresponds to a sequential pair of values in the frame buffer array.
    • Given the return value of bufferFromPixels as the input to logi.logiWrite, each of the 1024 pixels on the panel is set (to a certain color and intensity?), and will remain that way until the next call to logi.logiWrite (assuming nothing else is writing to the panel).
    Is my understanding (thus far) correct?  If so, what is the significance of each value in a single pair?  I'm assuming that one is color and the other is intensity?

    As for displaying text- I'll need a font file to generate each character I want to display.  What should the generated character look like?  I'm assuming an array of pixels that make up the character... is that right?  So it seems like on of the steps I'll need to do in my code is make a store of values that represent each character I'd like to display, eg. something like:

        'A': bufferFromPixels(some_function_to_generate_pixels(character='A', 'my_font.ttf')),
        'B': bufferFromPixels(some_function_to_generate_pixels(character='B', 'my_font.ttf')),

    However, as shown in my usage of the dummy function above, I'm not quite sure how I'd generate an array of "pixels" from a character and a font file (would that need to be some kind of bitmap?).  Also, I'm not sure how to combine those characters into a message to display on the panel.  Is this what you were offering as help?  If so, any advice and/or examples would be much appreciated!

    Thanks so much for all your help so far!

    PS- I found a python library called freetype.  Is this (or something like it) along the lines of what I'd need to get a bitmap for creating the frame buffer going out to the logi.logiWrite function?
  • edited November 2015
    Hi @jpiat

    I've made a bit of progress since my last message, but now running into some issues with chaining together two 16x32 panels.  A few basic questions regarding how these work together:

    I compiled the bitfile for a 32x32 board, but have been modifying my scripts for 16x32 for the time being.  Today I chained together two of these panels, and now I'm confused- instead of the chained display extending the first (I expected the highest pixel address to double), they seem to be (almost) mirroring each other.  I say "almost" because the chained panel is fuzzier than the second- I'm not sure how else to describe it, but it's almost as though the second one turns on an extra adjacent pixel.  Not sure what to make of it.

    I've uploaded my work-in-progress to GitHub in case you (or anyone else) would like to take a look:

    Thanks very much for your help!
  • Hi,

    to chain multiple panels, did you modify the ISE project for more panels ? There is a line in teh ISE project :

    MAT_0 : wishbone_led_matrix_ctrl
    generic map(
    nb_panels => 1,
    bits_per_color => 4

    that needs to be modified in

    MAT_0 : wishbone_led_matrix_ctrl
    generic map(
    nb_panels => 2,
    bits_per_color => 4

    In my understanding, a two chained 16x32 panels is not equivalent to a 32x32 panel.
  • Hi All

    I am trying to get this project working as well. I have done the same steps as TySkby, but still can't get anything to light up.

    I have the following differences: 1) I am using a 32x32 matrix. 2) My Logi-Bone is R1.5.1.

    When I do this: sudo logi_loader ./logibone_mat.bit, the done LED on the LB lights up, but none of the other LEDs flash. I also get this message: 

    Compiled for LOGI-BONE
    Board variant is LOGIBONE_R1.5
    bit file size : 340981
    bitstream loaded, check done led

    Not sure if this indicates a mismatch on LogiBone versions that is making it fail. 

    Can someone point me in the right directions, please?

  • edited February 28
    I managed to drive a 32x32 RGB Panel with the tips above. 
    Looking at the vhd files of "logibone_mat.xise" is it possible to drive a 32x64 Panel with minor adjustments?
    Setting   nb_panels : positive := 4  for two  32x64, does not work nor does nb_panels : positive := 2. 
    Any ideas? Also the python script to display full-screen rectangle:

    map = ()
    g = 0x00F0
    count = 0
    for c in range(1024):
            g = count << 4
    map = map + (g & 0xFF, ((g >> 8) & 0xFF))
    count = count + 1
            if count > 15:
                    count = 0
    logi.logiWrite(MAT_ADDR, map)


    Leaves out a middle column as well as the first and last on a 32x32 Panel. Why is that?
    I wished I could use Glen Akins`s version but loading the bitfile will yield that my Revision (R1.5) of logibone is incompatible.
    How could one account for that in the .xise file?

Sign In or Register to comment.