Go Down

Topic: Parola for arduino problem. My texts are reversed! (Read 13405 times) previous topic - next topic

rds356

Problem has been resolved too.
" Never give the fish, teach how to fishing"

nelsonkj

FIXED

For those of you who are still struggling, replace the PAROLA_HW with your appropriate type on this line:

#define HARDWARE_TYPE MD_MAX72XX::PAROLA_HW

PAROLA_HW    
Use the Parola style hardware modules.

GENERIC_HW    
Use 'generic' style hardware modules commonly available.

ICSTATION_HW    
Use ICStation style hardware module.

FC16_HW    
Use FC-16 style hardware module.



marco_c

Arduino Libraries https://github.com/MajicDesigns?tab=Repositories
Parola for Arduino https://github.com/MajicDesigns/Parola
Arduino++ blog https://arduinoplusplus.wordpress.com

pallusa

my texts are reversed ~ please help !!~


  https://youtu.be/jtHg-P_HlxM   (this is my project)

i am using MAX7219 Dot Matrix 4-in-1 module with arduino nano.


its all working fine but i cant seem to reverse the text .


i viewed the tutorial  where it was suggested to used the source file of MAX72xx header file and edit it...however that worked only on ver 2.10.0 i use the ver 3.0.2 but the part which i need to edit that is the  fc16 and parola_hw (for setting the value to 0 and 1) resp are not available ...hence i cannot use it to reverse my text.




i am fairly new to this ...this is my first arduino project ~ please help

marco_c

Since version 3 the module type is in the sketch. Look for it at the top of the file where the object is instantiated.
Arduino Libraries https://github.com/MajicDesigns?tab=Repositories
Parola for Arduino https://github.com/MajicDesigns/Parola
Arduino++ blog https://arduinoplusplus.wordpress.com

aydinaytac

Thanks @nelsonkj for your kindly help :) It definitely works!

FIXED

For those of you who are still struggling, replace the PAROLA_HW with your appropriate type on this line:

#define HARDWARE_TYPE MD_MAX72XX::PAROLA_HW

PAROLA_HW
Use the Parola style hardware modules.

GENERIC_HW
Use 'generic' style hardware modules commonly available.

ICSTATION_HW
Use ICStation style hardware module.

FC16_HW
Use FC-16 style hardware module.




jxid

FIXED

For those of you who are still struggling, replace the PAROLA_HW with your appropriate type on this line:

#define HARDWARE_TYPE MD_MAX72XX::PAROLA_HW

PAROLA_HW    
Use the Parola style hardware modules.

GENERIC_HW    
Use 'generic' style hardware modules commonly available.

ICSTATION_HW    
Use ICStation style hardware module.

FC16_HW    
Use FC-16 style hardware module.



Thank you my friend.
You solved my mirror problem.

prawnballnightmare

Hello,

Posting on an old thread as it's the most prominent on google for these issues.

I'm using the parolaESP8266 example to play with a NodeMCU connected to a 4 in a row LED matrix.

If I specify my hardware as PAROLA_HW I get perfect mirrored text (as I've read about a lot), and if I specify my hardware as FC16_HW, the text scrolls across my 4 panels in the wrong order.

i.e. If my panels are 0,1,2,3: the text scrolls from right to left across panel 0, then begins on the right hand side of panel 1, then 2, then 3, when it should start on the right of panel 3, then cross to the panel 2, then 1, then 0.

https://youtu.be/Z-9eBFkl1kI

The panel is wired from the left with IN --> Out --> arrows moving from left to right printed on the 4 boards (https://www.amazon.co.uk/gp/product/B06XJ9ZX17) if you turn it so the text is the right way up.

I note that in a number of places on the forums, it's said that the standard is to have panel groups wired from the right. I've tried connecting my controller to the connections on the right hand side of the chain, but I just get all LEDs lit, rather than the text that's being sent.

I've made the panel work with another library, but that library wasn't as well featured as this one (LedControl library: https://www.electronoobs.com/eng_arduino_ledcontrol.php)

Collecting together everything I've read, these are the steps I've taken:

I've made sure I specify the hardware in my code:

Code: [Select]
#define HARDWARE_TYPE MD_MAX72XX::FC16_HW
MD_Parola P = MD_Parola(HARDWARE_TYPE, CS_PIN, MAX_DEVICES);


I've read this post:

https://arduinoplusplus.wordpress.com/2017/04/14/parola-a-to-z-adapting-for-different-hardware/

And I've run the MD_MAX72xx_HW_Mapper.ino program to determine the correct settings, which it says are:

Code: [Select]
#define HARDWARE_TYPE MD_MAX72XX::FC16_HW
#define HW_DIG_ROWS 1
#define HW_REV_ROWS 0
#define HW_REV_COLS 0


I'm not entirely certain where to place these values if I wish to modify them, so I've tried putting these lines above my hardware pin definitions and setting something clearly wrong to see if anythign changes:

Code: [Select]
#define HW_DIG_ROWS 0
#define HW_REV_ROWS 1
#define HW_REV_COLS 1

#define MAX_DEVICES 4
#define CLK_PIN   D5 // or SCK
#define DATA_PIN  D7 // or MOSI
#define CS_PIN    D8 // or SS


I've also tried adding it to the top of a copy of the MD_MAX72XX.h header file and specifying the copy in my main code.

Code: [Select]
#include <MD_MAX72xxV2.h>

In either place, changing the numbers from 0 to 1 produces no difference in the output on the screen.

I expected to find the hardware definitions somewhere in one of the libraries, but a text search within all library files for FC16_HW doesn't find anything. I've also skim read the MX_MAX72xx.h and MD_Parola.h files, but can't see any definitions to modify.

I've also tried specifying zones in reverse order:

Code: [Select]
P.begin(4);
P.setZone(0, 3, 0);


But this results in display on just one of the 4 panels.

Seems like everyone else who read the docs managed to solve their issue, is there any way to make a left wired 4 chain panel work with this library? Is there an effect I can apply within the Parola library to flip my text or panel ordering, perhaps to use the PAROLA_HW config but flip the character definitions themselves? It feels like I'm missing something obvious.

Thanks for your assistance


Paul__B

I note that in a number of places on the forums, it's said that the standard is to have panel groups wired from the right.
That is in fact how it must be done with FC16 modules.

I've tried connecting my controller to the connections on the right hand side of the chain, but I just get all LEDs lit, rather than the text that's being sent.
You wire them up so they work as apparently you have already done.  No mucking about with the wiring.

Then you orient them so that the controller feeds from the right hand side.

It should then work with no change to the parameters.  So I suspect your mucking about with
Code: [Select]
#define HW_DIG_ROWS 1
#define HW_REV_ROWS 0
#define HW_REV_COLS 0

Is the cause of your problem.  You should not have to alter the basic examples at all beyond setting HARDWARE_TYPE.

prawnballnightmare

Thanks for the quick reply, I did that at first: the example for the ESP8266 worked like this as is. I only started messing with the fruitier settings when it didn't work as expected.

Oriented with the controller feeding from the right hand side, my text is reliably upside down when the pins are on the right, whatever setting I choose.

This is with the hardware set to PAROLA_HW so the displays at least run in sequence, but the text is mirrored and in this orientation, upside down. It should say REDRUM.

https://youtu.be/bj7Tb3sp59Q

Adding the custom hardware settings like HW_DIG_ROWS didn't change the display on the screen at all.

Tomorrow, I will go back to the original example and rework from scratch. I may get different hardware settings if I run the MD_MAX72xx_HW_Mapper with the pins on the right, now I'm certain of the correct orientation.

If I do, would they just go at the top of my code?

marco_c

Quote
Oriented with the controller feeding from the right hand side, my text is reliably upside down when the pins are on the right, whatever setting I choose.
This comes from mucking around with the settings in the library.

YOU DO NOT HAVE TO CHANGE ANYTHING IN THE LIBRARY.

Reinstall the library using the IDE and then change the settings AT THE TOP OF THE SKETCH to FC16.

Wire up your matrix so that the IN side is connected to the Arduino. Orient the matrix so that the IN side is on the right as you look at the matrix. This is as Paul has already said.
Arduino Libraries https://github.com/MajicDesigns?tab=Repositories
Parola for Arduino https://github.com/MajicDesigns/Parola
Arduino++ blog https://arduinoplusplus.wordpress.com

prawnballnightmare

OK, it's working... Thank you!

I oriented the matrix chain with the inputs on the Right, as suggested and loaded the MD_MAX72XX_HW_Mapper.ino again. Following the instructions with the panel oriented correctly gave me a different hardware config, and now my text is displayed correctly.

Code: [Select]
#define HARDWARE_TYPE MD_MAX72XX::ICSTATION_HW




These are the steps I took...

Find the MD_MAX72XX_HW_Mapper.ino file within examples in the Arduino MAX72XX library folder and open in the Arduino IDE. For me this was located in:

Code: [Select]
C:\Users\Username\Documents\Arduino\libraries\arduino_77591\examples\MD_MAX72xx_HW_Mapper

Modify the Pin definitions according to how you've wired up the LED matrix.

I'm using a nodemcu so my config looked like this:

Code: [Select]

// Hardware definition
#define CLK_PIN   D5  // or SCK
#define DATA_PIN  D7  // or MOSI
#define CS_PIN    D8  // or SS



Upload the program so it runs on your hardware and while still plugged into your computer, open Tools --> Serial Monitor from the Arduino IDE.

At first I had nonsense characters in the console, so I had to set the serial speed lower at the top of the sketch:

Code: [Select]
#define SERIAL_SPEED 4800

Once reuploaded, I could see instructions scrolling in the console. The program would crash and loop half way down the first page of text, filling the console continuously. Having read the instructions from the source code, I removed the majority of the serial output from the sketch (too much text output for my hardware?).

Reuploading and starting over again, the console would now pause and ask me to enter Y or N to answer a series of questions about the output I could see on my LED matrix, do I see rows or columns of lights, are they going left to right etc.

Putting in these answers gave a message with a set of hardware parameters and the type of display my answers indicated I had.

Something like:

Code: [Select]
#define HW_DIG_ROWS 0
#define HW_REV_ROWS 1
#define HW_REV_COLS 1

Set hardware to ICSTATION_HW


All that was necessary was to take the hardware string and modify the line in my main sketch code where parola is instantiated:

Code: [Select]

#define HARDWARE_TYPE MD_MAX72XX::ICSTATION_HW
MD_Parola P = MD_Parola(HARDWARE_TYPE, CS_PIN, MAX_DEVICES);


This resulted in correct output on my hardware.  :)






Paul__B

So it seems you did not do as Marco advised, but something random instead.  :smiley-eek:

Please at least confirm that you are using the display that I illustrated?

prawnballnightmare

Marco was correct in that the root cause sat with the hardware configuration.

The matrix I'm using looks near identical to the one pictured in your post above.

Thanks again for your assistance

Go Up