Go Down

Topic: Scrolling LED matrix display - Parola for Arduino (Read 321949 times) previous topic - next topic

DaIceMan

Marco what Borzov means is that even without the protoboard (translated incorrectly and literally as "scoreboard" due to translator) he has the same issues as I pointed out and that the onboard "activity LED" (pin 13) is an indicator of the correct or not operation of the code: when everything works correctly (display OK) the blink timing is different than when it fails to work and displays nothing - in this case I noticed it either doesn't blink at all or shows a different blink frequency pattern.

marco_c

Protoboard = LED matrix pcb I assume.

The SPI protocol does not handshake, so having the device at the other end makes no difference to the sending device. I get that the LED not blinking means that it is not sending (or at least not properly) and it is probably not dependent on the LED device. This is useful information.

Have either of you actually checked how much RAM memory you have free on the Arduino? You should find code that allows you to print the amount of RAM remaining (FreeMem or FreeRAM, from memory, Google is your friend) and print this at the end of the setup() function. Both MD_Parola and MD_MAX72xx allocate memory proportional to the number of display modules, so the amount reported by the linker/compiler is not the same as is left at run time.
Arduino Libraries https://github.com/MajicDesigns?tab=Repositories
Parola for Arduino https://github.com/MajicDesigns/Parola
Arduino++ blog https://arduinoplusplus.wordpress.com

borzov161

thank you DaIceMan. my technical translation is bad.
you understood me correctly.thank you

DaIceMan

#1128
Aug 24, 2017, 05:45 pm Last Edit: Aug 24, 2017, 05:50 pm by DaIceMan
Protoboard = LED matrix pcb I assume.

The SPI protocol does not handshake, so having the device at the other end makes no difference to the sending device. I get that the LED not blinking means that it is not sending (or at least not properly) and it is probably not dependent on the LED device. This is useful information.

Have either of you actually checked how much RAM memory you have free on the Arduino? You should find code that allows you to print the amount of RAM remaining (FreeMem or FreeRAM, from memory, Google is your friend) and print this at the end of the setup() function. Both MD_Parola and MD_MAX72xx allocate memory proportional to the number of display modules, so the amount reported by the linker/compiler is not the same as is left at run time.
With "Protoboard" I meant the white Prototype board where you place your components/arduino.

   I checked runtime freemem and I get 876bytes using a modified library from here:

http://forum.arduino.cc/index.php?topic=27536.15

 By removing an include thus freeing up some memory I actually cause it to not work. I still get output from the debug so the code is working, it just isn't displaying anything and the activity LED is flashing very fast constantly while when it is working properly the flashes are slightly more variable in duration.

   At the moment I managed to get the code working with all my includes by removing the NANO loader (I am using a NANO where I can) and replacing it with the UNO loader which gives me 1.5K more program space and a faster upload time (115K vs 56k). As I said, once the arduino initializes/boot properly everything works correctly (I get regular DCF synch updates without any glitches). I had to set though 6 modules instead of 5 to get it working as explained above, and shift the whole display zones one module to the right. I don't think it's memory/stack exhaustion related as removing includes makes it fail while increasing module number makes it work though I admit when reaching RAM memory limits the behavior can become unpredictable - even so if there were a stack overflow / overwrite it would occur with allocating more segments than less.

   I really don't know what else to try to locate the issue - maybe the combination of my type of module (FC-16) and this library is the culprit which is why it hasn't popped up sooner. When I receive more modules I will try and see what happens - for the time being it works and I learned how to workaround the problem and know it isn't my hardware.

  Thanks for the help - will update when I get more matrixes!

marco_c

You're right it does not sound like a memory problem. Have you noticed a difference between odd/even numbers of modules or is it just one configuration?

I can't see the issue with my setup (Uno and any number of modules) but the problem seems similar to one we had a long time ago related to the initialisation of the modules (going back to near the beginning of this forum thread).

One thing you can do it turn on the debugging in the MD_MAX72xx library and see what is happening. This is done by setting the relevant DEBUG flag in the _lib.h file. There will be a lot of output so it is worth making the code the minimum that causes the problem. Sometimes the problem goes away due to the debug output. This is usually a clue that the problem is either timing related or some sort of pointer/stack corruption.
Arduino Libraries https://github.com/MajicDesigns?tab=Repositories
Parola for Arduino https://github.com/MajicDesigns/Parola
Arduino++ blog https://arduinoplusplus.wordpress.com

robiv8

Hallo Marco,
I will set my Display Intensity
can you say a newbie wy this is not work

Code: [Select]

. . .
void setup(void)
{
  P.begin(2);
  P.setInvert(false);
  P.setIntensity(1); // Display Intensity

  P.setZone(0, 0, MAX_DEVICES-5);
  . . .


Thanks Robert

marco_c

What does "not work" mean exactly? Does the matrix not display text or is it just not dimming?

If you mean that no dimming is seen then you probably have a LED matrix that has a very low resistance for the intensity setting (usually around 10k). These matrices are very bright and don't show much difference between the brightness levels (intensity 0 is still bright!). I use values more like 70k for my matrices and they have good discrimination between the lowest and highest intensities.

The MD_MAX72xx_Test sketch has a test for intensity settings so you can check what happens with that code.
Arduino Libraries https://github.com/MajicDesigns?tab=Repositories
Parola for Arduino https://github.com/MajicDesigns/Parola
Arduino++ blog https://arduinoplusplus.wordpress.com

robiv8

#1132
Aug 29, 2017, 12:15 am Last Edit: Aug 29, 2017, 12:30 am by robiv8
Yes i mean it just not dimming!
I will try your hint with MD_Max72xx

robiv8

#1133
Aug 29, 2017, 12:34 am Last Edit: Aug 29, 2017, 12:48 am by robiv8
! Yes it works in the Test sketch.
And i use your Parola_Zone_TimeMsg

but now i see only the first of the 8 Matrix is low.
So i try to put the code at the end of the Voide Setup and now it works :-)

Code: [Select]
void setup(void)
{
  P.begin(2);
  P.setInvert(false);

  P.setZone(0, 0, MAX_DEVICES-5);

  getTime(szTime);

  P.setIntensity(1); // Display Intensity
}


Thank you for the hint.

robiv8

One new question!
I have this error by testing the Parola_Animation_Catalog
Parola_Animation_Catalog:29: error: expected ',' or ';' before 'typedef'
 typedef struct

What does it mean?

marco_c

Quote
Parola_Animation_Catalog:29: error: expected ',' or ';' before 'typedef'
Line 29 expects a , or ; before the word 'typedef'. If this is the first error then check the syntax of the lines before the error.
Arduino Libraries https://github.com/MajicDesigns?tab=Repositories
Parola for Arduino https://github.com/MajicDesigns/Parola
Arduino++ blog https://arduinoplusplus.wordpress.com

robiv8

#1136
Aug 30, 2017, 11:12 pm Last Edit: Aug 30, 2017, 11:55 pm by robiv8
OK i found it.
i put a ; after the MD_Parola P = MD_Parola(DATA_PIN, CLK_PIN, CS_PIN, MAX_DEVICES)

Thanks

marco_c

Code: [Select]
MD_Parola P = MD_Parola(DATA_PIN, CLK_PIN, CS_PIN, MAX_DEVICES)

This is missing a ; on the end.
Arduino Libraries https://github.com/MajicDesigns?tab=Repositories
Parola for Arduino https://github.com/MajicDesigns/Parola
Arduino++ blog https://arduinoplusplus.wordpress.com

borzov161

Hallo Marco
I tried the examples library.
"Parola_Test", "Parola_Bluetooth_Control",
"Parola_Print_Test" and "Parola_Double_Height_Test".
examples of shows error (syntax). Нere is a photo.
https://i-a.d-cd.net/c787979s-960.jpg
https://i-a.d-cd.net/2787979s-240.jpg
And as always, the sketch hangs on the line P. begin(2);
If the sketch 1 altitude (P. begin();) , success always!
Really sorry, the translation of technical.
I hope the meaning will be clear

marco_c

You have a mix of old and new in the library. Please download full set from distribution site or library manager.
Arduino Libraries https://github.com/MajicDesigns?tab=Repositories
Parola for Arduino https://github.com/MajicDesigns/Parola
Arduino++ blog https://arduinoplusplus.wordpress.com

Go Up