Store › Forums › RGB Matrix Backpack › Bugs/Problems › Demo doesn’t Work
- This topic has 9 replies, 3 voices, and was last updated 9 years, 4 months ago by rschildge.
-
AuthorPosts
-
June 5, 2015 at 5:42 pm #773Blevo90Member
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?
June 6, 2015 at 11:47 am #2277MichaelKeymasterHow about some details on the code that won’t compile? I can help if you actually show me the error.
July 16, 2015 at 2:00 am #2296rschildgeMemberI 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]July 16, 2015 at 1:51 pm #2297MichaelKeymasterArduino 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.July 16, 2015 at 3:20 pm #2299MichaelKeymasterI have now updated the MatrixDemo_v2.zip downloadable from the main product page so that it works with the newer versions of Arduino.
July 16, 2015 at 4:32 pm #2300rschildgeMemberI 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.
July 16, 2015 at 5:56 pm #2301MichaelKeymasterI mean v2 version of the Matrix Backpack board, not the Arduino. Where did you get the backpack board? From us or Adafruit?
July 16, 2015 at 7:13 pm #2302rschildgeMemberI purchased your backpack board from Adafruit.
July 16, 2015 at 8:35 pm #2303MichaelKeymasterIf you have an old version of this board (it does not say “v2”), then change the definition of LAT to A3:
#define LAT A3July 17, 2015 at 12:57 am #2304rschildgeMemberIt works! Thank you for your help.
-
AuthorPosts
- You must be logged in to reply to this topic.