Making 64 x 64 animated gif with two 32 x 64 matrices

EL Wire/Tape/Panels, LEDs, pixels and strips, LCDs and TFTs, etc products from Adafruit

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
User avatar
Cornishrefugee
 
Posts: 11
Joined: Tue Nov 08, 2022 8:31 pm

Making 64 x 64 animated gif with two 32 x 64 matrices

Post by Cornishrefugee »

Hello everyone,

I'm a newcomer and trying my hand at creating a 64 x 64 animated gif, for the purpose of showing Christmas gifs on a loop. I bought the Adabox 016 which included the Matrix Portal m4 etc.
I managed to get the one 32 x 64 matrix to show gifs by following https://learn.adafruit.com/animated-gif ... l?view=all. It worked well, but I decided I'd prefer to have it slightly bigger. So I bought another panel (also from Adafruit) with the idea of joining them together.
I followed the instructions to use Arduino IDE so I could change the matrix size to height 64, width 64.

When I try to compile it, I receive the following error :-
"Compilation error: invalid conversion from 'void* (*)(char*, int32_t*)' {aka 'void* (*)(char*, long int*)'} to 'void* (*)(const char*, int32_t*)' {aka 'void* (*)(const char*, long int*)'} [-fpermissive]"

I believe I followed the instructions correctly, installed the correct libraries etc etc. I also soldered the 8 pin as the guide suggested, however I'm at a loss how to figure out what to do to solve the problem.

I hope this is the correct part of the forum to ask for help, I couldn't see anyone else with exactly the same issue, so I assume it's my issue and nothing to do with the instructions I followed.

I'd be happy to give any more details that might help diagnose the issue.

Thanks in anticipation!

User avatar
mikeysklar
 
Posts: 13824
Joined: Mon Aug 01, 2016 8:10 pm

Re: Making 64 x 64 animated gif with two 32 x 64 matrices

Post by mikeysklar »

Did you solder the E jumper on the Matrix Portal?

Code: Select all

NOTE: 64x64 matrices require soldering between two pads on the MatrixPortal board. This is explained in the MatrixPortal guide (see “Address E Line Jumper” at the bottom). Other matrix sizes (64x32 and 32x16) are plug-and-play with just the code change.
Can you post the code you are running and an 800x600 resolution image of the 8-pin soldering you have done.

Is this the guide you are using?

https://learn.adafruit.com/animated-gif ... l?view=all

User avatar
Cornishrefugee
 
Posts: 11
Joined: Tue Nov 08, 2022 8:31 pm

Re: Making 64 x 64 animated gif with two 32 x 64 matrices

Post by Cornishrefugee »

Hi, your response is much appreciated!

Yes, I followed that guide initially when I just had the single panel. Everything worked perfectly.
When I decided to add a second panel to make it 64 x 64 I saw in the Compiling and Customizing section of the guide that I now would have to use Arduino IDE and the Protomatter and AnimatedGIF libraries to do so.

So I installed Arduino IDE and continued to follow the same guide. I changed the code for matrix height from 32 to 64, and then soldered the middle pad to the 8 pad. I'm not a master solderer but I think it is good enough. I'll attach the image you requested.
solder800x600.jpg
solder800x600.jpg (373.64 KiB) Viewed 445 times
When I try to compile the changes I get the error I put in my original post.

I'll attach a txt file that has the code I'm trying to compile with the error message pasted below the code.

Hopefully this helps you see what I'm doing wrong. Please let me know if I can provide more useful info/details.

Thanks again for your time and help!
Attachments
Animatedgifcode_with error message.txt
(14.94 KiB) Downloaded 11 times

User avatar
mikeysklar
 
Posts: 13824
Joined: Mon Aug 01, 2016 8:10 pm

Re: Making 64 x 64 animated gif with two 32 x 64 matrices

Post by mikeysklar »

Thank you for supplying the error message and code.

It looks like you are getting stuck on the value of GIFOpenFile on line 354 which probably means the code is not finding your GIFs.

Do you have a /gifs folder that you had setup with temporary CircuitPython install to get the files in place?

https://learn.adafruit.com/animated-gif ... quickstart

User avatar
Cornishrefugee
 
Posts: 11
Joined: Tue Nov 08, 2022 8:31 pm

Re: Making 64 x 64 animated gif with two 32 x 64 matrices

Post by Cornishrefugee »

Thank you again, I truly appreciate you taking the time to help me with this.

Yes, I have created a /gifs folder. I'll attach another image so you can see if it looks correct.
gifsfolder.jpg
gifsfolder.jpg (117.1 KiB) Viewed 432 times
I'm obviously doing something wrong but I just can't work it out. I follow the guide exactly and get the same outcome each time. Are there any other details/info that I could pass on to help you understand what's going on?

This is the error notification that pops up in the program, perhaps that gives a clue?
errormsg.jpg
errormsg.jpg (38.9 KiB) Viewed 432 times

User avatar
mikeysklar
 
Posts: 13824
Joined: Mon Aug 01, 2016 8:10 pm

Re: Making 64 x 64 animated gif with two 32 x 64 matrices

Post by mikeysklar »

Can you show me the contents of the /gifs folder?

Also, would you be able to provide the version number of the Arduino IDE and libraries that you have installed related to this guide? There can be compiler incompatibilities or library dependency problems based on this message. It looks like the compiler is being strict so I suspect you are using Arduino IDE 2.x, but the guide was written for Arduino IDE 1.8.x

User avatar
Cornishrefugee
 
Posts: 11
Joined: Tue Nov 08, 2022 8:31 pm

Re: Making 64 x 64 animated gif with two 32 x 64 matrices

Post by Cornishrefugee »

Thanks for sticking with me! I'll do my best to provide the info you asked for.

Firstly, the contents of the /gifs folder is currently just one gif. It's an Xmas tree gif and I've attached it to this post.
treetree.gif
treetree.gif (13.67 KiB) Viewed 421 times
My plan is to get the thing working, and then add more gifs once the hard part is achieved.

My Arduino IDE version number is 2.0.2. I didn't consider that a guide written on an older version may not work on the latest version.

Here is a list of the required libraries, and their version numbers:-
Adafruit Protomatter 1.5.3
AnimatedGIF 1.4.7

User avatar
mikeysklar
 
Posts: 13824
Joined: Mon Aug 01, 2016 8:10 pm

Re: Making 64 x 64 animated gif with two 32 x 64 matrices

Post by mikeysklar »

Install the Legacy 1.8.19 IDE, add in the required libraries and try to compile the code. Let's see if that resolves the compilation for you. If it does we can look at putting in a request for IDE 2.x compatibility (newer compiler).

https://www.arduino.cc/en/software

User avatar
Cornishrefugee
 
Posts: 11
Joined: Tue Nov 08, 2022 8:31 pm

Re: Making 64 x 64 animated gif with two 32 x 64 matrices

Post by Cornishrefugee »

I installed 1.8.19 IDE, installed the same libraries, but still get the exact same error message. You have made me wonder if it could be a library issue. Is it possible an older version of a library might solve it? Or am I clutching at straws?

Thanks again for your help.

User avatar
mikeysklar
 
Posts: 13824
Joined: Mon Aug 01, 2016 8:10 pm

Re: Making 64 x 64 animated gif with two 32 x 64 matrices

Post by mikeysklar »

Good news. I see the issue.

Change this line in the example code aniamted_gif.ino (line 92):

Code: Select all

void *GIFOpenFile(char *filename, int32_t *pSize) {
to this:

Code: Select all

void *GIFOpenFile(const char *filename, int32_t *pSize) {
I was able to compile the sketch with all the latest libraries using Arduino IDE 1.8.19 without issue.

It looks like the opposite change was made Nov. 6th 2020.

https://github.com/adafruit/Adafruit_Pr ... 25edfd6a56

User avatar
alphanumeric
 
Posts: 633
Joined: Sun Sep 07, 2014 7:06 pm

Re: Making 64 x 64 animated gif with two 32 x 64 matrices

Post by alphanumeric »

I have two of the 32 high by 64 wide. That I plan on setting up with one on top of the other. 64 high by 64 wide. I'm waiting for my Matrix Portal to show up, should be here today or tomorrow.

Physically its 64 x 64, but isn't it actually 32 x 128 code wise?

User avatar
Cornishrefugee
 
Posts: 11
Joined: Tue Nov 08, 2022 8:31 pm

Re: Making 64 x 64 animated gif with two 32 x 64 matrices

Post by Cornishrefugee »

mikeysklar wrote: Wed Nov 30, 2022 9:21 pm Good news. I see the issue.

Change this line in the example code aniamted_gif.ino (line 92):

Code: Select all

void *GIFOpenFile(char *filename, int32_t *pSize) {
to this:

Code: Select all

void *GIFOpenFile(const char *filename, int32_t *pSize) {
I was able to compile the sketch with all the latest libraries using Arduino IDE 1.8.19 without issue.

It looks like the opposite change was made Nov. 6th 2020.

https://github.com/adafruit/Adafruit_Pr ... 25edfd6a56
We're making progress! After making the change you suggested I can now compile the sketch and upload to the device. Unfortunately it just sits there doing nothing, even with a gif in the correct folder. Should I be entering 32 x 128 as alphanumeric suggested? I have a feeling it's close to working now though :)

User avatar
mikeysklar
 
Posts: 13824
Joined: Mon Aug 01, 2016 8:10 pm

Re: Making 64 x 64 animated gif with two 32 x 64 matrices

Post by mikeysklar »

Good working. Compile + Upload means we are getting close.

Did you open a serial console? Does anything appear on there?

It would be a good idea to add some print() statements to the code so we can monitor the console and determine where things might be getting hung.

If the 64x64 is not working feel free to try alphanumerics suggestion.

User avatar
Cornishrefugee
 
Posts: 11
Joined: Tue Nov 08, 2022 8:31 pm

Re: Making 64 x 64 animated gif with two 32 x 64 matrices

Post by Cornishrefugee »

If I open the serial monitor in Arduino IDE it is just a rapid scrolling of the filenames of the two gifs I have in the gif folder. I'll paste a snippet below.
"20:56:57.534 -> Opening file '/gifs/mariokart.gif'
20:56:57.534 -> Opening file '/gifs/hoppy.gif'
20:56:57.534 -> Opening file '/gifs/mariokart.gif'
20:56:57.534 -> Opening file '/gifs/hoppy.gif'
20:56:57.534 -> Opening file '/gifs/mariokart.gif'
20:56:57.581 -> Opening file '/gifs/hoppy.gif'
20:56:57.581 -> Opening file '/gifs/mariokart.gif'
20:56:57.581 -> Opening file '/gifs/hoppy.gif'
20:56:57.581 -> Opening file '/gifs/mariokart.gif'
20:56:57.581 -> Opening file '/gifs/hoppy.gif'
20:56:57.581 -> Opening file '/gifs/mariokart.gif'
20:56:57.581 -> Opening file '/gifs/hoppy.gif'
20:56:57.581 -> Opening file '/gifs/mariokart.gif'"

So at least it's doing something, I just don't know what haha.

User avatar
mikeysklar
 
Posts: 13824
Joined: Mon Aug 01, 2016 8:10 pm

Re: Making 64 x 64 animated gif with two 32 x 64 matrices

Post by mikeysklar »

Okay two things.

1) go over the solder on the E jumper again. It just look like a cold blob with no flow there.

2) What is the resolution of your GIFs? Are they interlaced (those don't work)? Did you try the stock ones? I know they are 64x32, but they are known to work at that resolution.

https://learn.adafruit.com/animated-gif ... ample-gifs

Locked
Please be positive and constructive with your questions and comments.

Return to “Glowy things (LCD, LED, TFT, EL) purchased at Adafruit”