Demo doesn’t Work

Store Forums RGB Matrix Backpack Bugs/Problems Demo doesn’t Work

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #773
    Blevo90
    Member

    Arduino Uno running IDE 1.6.4
    The Demo won’t compile I have tried to change the problem code with const unsigned char but then it won’t even compile it just sits there and crashes.

    What I really want to do is display a image or scrolling image can you show me some example code on how to do that?

    #2277
    Michael
    Keymaster

    How about some details on the code that won’t compile? I can help if you actually show me the error.

    #2296
    rschildge
    Member

    I had the same error. I am running the 1.6.5 IDE. I changed ‘prog_uchar’ to ‘const unsigned char’ as well in 2nd line of the .cpp files and here:

    extern const unsigned char pacman_bitmaps[];
    extern const unsigned char letter_bitmaps[];
    extern const unsigned char invader_bitmaps[];

    Here is what I’m getting now as an error:

    MatrixDemo_v2:69: error: invalid conversion from ‘const unsigned char*’ to ‘unsigned char*’ [-fpermissive]
    MatrixDemo_v2:69: error: invalid conversion from ‘const unsigned char*’ to ‘unsigned char*’ [-fpermissive]
    MatrixDemo_v2:69: error: invalid conversion from ‘const unsigned char*’ to ‘unsigned char*’ [-fpermissive]
    MatrixDemo_v2:69: error: invalid conversion from ‘const unsigned char*’ to ‘unsigned char*’ [-fpermissive]
    MatrixDemo_v2:69: error: invalid conversion from ‘const unsigned char*’ to ‘unsigned char*’ [-fpermissive]
    MatrixDemo_v2:69: error: invalid conversion from ‘const unsigned char*’ to ‘unsigned char*’ [-fpermissive]
    MatrixDemo_v2:69: error: invalid conversion from ‘const unsigned char*’ to ‘unsigned char*’ [-fpermissive]
    MatrixDemo_v2:69: error: invalid conversion from ‘const unsigned char*’ to ‘unsigned char*’ [-fpermissive]
    MatrixDemo_v2:69: error: invalid conversion from ‘const unsigned char*’ to ‘unsigned char*’ [-fpermissive]
    MatrixDemo_v2:69: error: invalid conversion from ‘const unsigned char*’ to ‘unsigned char*’ [-fpermissive]
    MatrixDemo_v2:69: error: invalid conversion from ‘const unsigned char*’ to ‘unsigned char*’ [-fpermissive]
    MatrixDemo_v2.ino: In function ‘void drawPacMan(int, int)’:
    MatrixDemo_v2:8: error: invalid conversion from ‘const unsigned char*’ to ‘unsigned char*’ [-fpermissive]
    MatrixDemo_v2.ino:77:31: note: in expansion of macro ‘PACMAN_BITMAP’
    MatrixDemo_v2:9: error: invalid conversion from ‘const unsigned char*’ to ‘unsigned char*’ [-fpermissive]
    MatrixDemo_v2.ino:79:18: note: in expansion of macro ‘PACMAN_LEFT_BITMAP’
    MatrixDemo_v2.ino: In function ‘void drawDeadGhost(int, int)’:
    MatrixDemo_v2:98: error: invalid conversion from ‘const unsigned char*’ to ‘unsigned char*’ [-fpermissive]
    MatrixDemo_v2:51: error: initializing argument 3 of ‘uint8_t drawBitmap(int, int, unsigned char*, uint16_t)’ [-fpermissive]
    MatrixDemo_v2:12: error: invalid conversion from ‘const unsigned char*’ to ‘unsigned char*’ [-fpermissive]
    MatrixDemo_v2.ino:99:20: note: in expansion of macro ‘GHOST_FACE’
    MatrixDemo_v2:51: error: initializing argument 3 of ‘uint8_t drawBitmap(int, int, unsigned char*, uint16_t)’ [-fpermissive]
    MatrixDemo_v2.ino: In function ‘void drawGhost(int, int, uint16_t, int)’:
    MatrixDemo_v2:103: error: invalid conversion from ‘const unsigned char*’ to ‘unsigned char*’ [-fpermissive]
    MatrixDemo_v2:51: error: initializing argument 3 of ‘uint8_t drawBitmap(int, int, unsigned char*, uint16_t)’ [-fpermissive]
    MatrixDemo_v2:11: error: invalid conversion from ‘const unsigned char*’ to ‘unsigned char*’ [-fpermissive]
    MatrixDemo_v2.ino:105:22: note: in expansion of macro ‘GHOST_EYES’
    MatrixDemo_v2:51: error: initializing argument 3 of ‘uint8_t drawBitmap(int, int, unsigned char*, uint16_t)’ [-fpermissive]
    MatrixDemo_v2:11: error: invalid conversion from ‘const unsigned char*’ to ‘unsigned char*’ [-fpermissive]
    MatrixDemo_v2.ino:109:24: note: in expansion of macro ‘GHOST_EYES’
    MatrixDemo_v2:51: error: initializing argument 3 of ‘uint8_t drawBitmap(int, int, unsigned char*, uint16_t)’ [-fpermissive]
    MatrixDemo_v2.ino: In function ‘void drawInvaders(int, int, int)’:
    MatrixDemo_v2:183: error: invalid conversion from ‘const unsigned char*’ to ‘unsigned char*’ [-fpermissive]
    MatrixDemo_v2:51: error: initializing argument 3 of ‘uint8_t drawBitmap(int, int, unsigned char*, uint16_t)’ [-fpermissive]
    MatrixDemo_v2:186: error: invalid conversion from ‘const unsigned char*’ to ‘unsigned char*’ [-fpermissive]
    MatrixDemo_v2:51: error: initializing argument 3 of ‘uint8_t drawBitmap(int, int, unsigned char*, uint16_t)’ [-fpermissive]
    MatrixDemo_v2:189: error: invalid conversion from ‘const unsigned char*’ to ‘unsigned char*’ [-fpermissive]
    MatrixDemo_v2:51: error: initializing argument 3 of ‘uint8_t drawBitmap(int, int, unsigned char*, uint16_t)’ [-fpermissive]
    MatrixDemo_v2.ino: In function ‘void pacmanGameDemo()’:
    MatrixDemo_v2:13: error: invalid conversion from ‘const unsigned char*’ to ‘unsigned char*’ [-fpermissive]
    MatrixDemo_v2.ino:356:24: note: in expansion of macro ‘SCORE’
    MatrixDemo_v2:51: error: initializing argument 3 of ‘uint8_t drawBitmap(int, int, unsigned char*, uint16_t)’ [-fpermissive]
    invalid conversion from ‘const unsigned char*’ to ‘unsigned char*’ [-fpermissive]

    #2297
    Michael
    Keymaster

    Arduino 1.6.x deals with PROGMEM data differently because of changes in GCC. Try the attached sketch. All the bitmaps are included in the .ino file now, so there is only one file in this new version.
    Note that this is for the v2 version of the board. If you have a v1 version (e.g. sold by Adafruit) let me know.

    #2299
    Michael
    Keymaster

    I have now updated the MatrixDemo_v2.zip downloadable from the main product page so that it works with the newer versions of Arduino.

    http://nootropicdesign.com/matrixbackpack

    #2300
    rschildge
    Member

    I purchased my Uno from Anafruit recently, and I don’t see anything on it that says V2. It is the R3 pictured here: https://www.arduino.cc/en/Main/ArduinoBoardUno

    The code compiles now but when I upload it I get some random pixels that light up and just stay on. The other sample code from Anafruit works, so I know my hardware is working. Thanks for your help.

    #2301
    Michael
    Keymaster

    I mean v2 version of the Matrix Backpack board, not the Arduino. Where did you get the backpack board? From us or Adafruit?

    #2302
    rschildge
    Member

    I purchased your backpack board from Adafruit.

    #2303
    Michael
    Keymaster

    If you have an old version of this board (it does not say “v2”), then change the definition of LAT to A3:
    #define LAT A3

    #2304
    rschildge
    Member

    It works! Thank you for your help.

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.