Parola for arduino problem. My texts are reversed!

Hi,
I am trying display and scroll texts with Parola for arduino sample codes + MAX 7219.
Those displays words, but they show reversed texts! Does anyone encountered to the same problem?

Here is the video link how it is look-a-like.

It will be great if you know some advice for it.
I tried to use scroll_right, but it doesn't work.
Tomomi
(code tags added by moderator)

-----------------------------------------------------------------

// Program to demonstrate the MD_Parola library
//
// For every string defined by pc[] iterate through all combinations 
// of entry and exit effects.
//
// Animation speed can be controlled using a pot on pin SPEED_IN

#include <MD_Parola.h>
#include <MD_MAX72xx.h>
#include <SPI.h>

// Define the number of devices we have in the chain and the hardware interface
// NOTE: These pin numbers will probably not work with your hardware and may 
// need to be adapted
#define	MAX_DEVICES	12
#define	CLK_PIN		13
#define	DATA_PIN	11
#define	CS_PIN		10

// set to 1 if we are implementing the user interface pot
#define	USE_UI_CONTROL	1

#if USE_UI_CONTROL
#define	SPEED_IN	A0
#endif // USE_UI_CONTROL

#define	PAUSE_TIME		1000
#define	SPEED_DEADBAND	5
uint8_t	frameDelay = 25;	// default frame delay value


#if INCLUDE_HARDWARE_SPI
MD_Parola P = MD_Parola(CS_PIN, MAX_DEVICES);
#else
MD_Parola P = MD_Parola(DATA_PIN, CLK_PIN, CS_PIN, MAX_DEVICES);
#endif // USE_HARDWARE_SPI

#define	SPEED_TIME	25
#define	PAUSE_TIME	1000

// Turn on debug statements to the serial output
#define  DEBUG  1

#if  DEBUG
#define	PRINT(s, x)	{ Serial.print(F(s)); Serial.print(x); }
#define	PRINTS(x)	Serial.print(F(x))
#define	PRINTX(x)	Serial.println(x, HEX)
#else
#define	PRINT(s, x)
#define PRINTS(x)
#define PRINTX(x)
#endif

// Global variables
uint8_t  curText;
char	*pc[] = 
{ 
  "Parola for",
  "Arduino",
};

uint8_t  inFX, outFX;
MD_Parola::textEffect_t	effect[] =
{
  MD_Parola::PRINT,
  MD_Parola::SCROLL_LEFT,
  MD_Parola::WIPE,
  MD_Parola::SCROLL_UP,
  MD_Parola::OPENING_CURSOR,
  MD_Parola::BLINDS,
  MD_Parola::CLOSING,
  MD_Parola::WIPE_CURSOR,
  MD_Parola::DISSOLVE,
  MD_Parola::OPENING,
  MD_Parola::CLOSING_CURSOR,
  MD_Parola::SCROLL_RIGHT,
  MD_Parola::SCROLL_DOWN,
  MD_Parola::SLICE,
};

#if USE_UI_CONTROL
void doUI(void)
{
  // set the speed if it has changed
  {
    int16_t	speed = map(analogRead(SPEED_IN), 0, 1023, 0, 250);

//    if ((speed >= ((int16_t)P.getSpeed() + SPEED_DEADBAND)) || 
//      (speed <= ((int16_t)P.getSpeed() - SPEED_DEADBAND)))
    if (speed != (int16_t)P.getSpeed()) 
    {
      P.setSpeed(speed);
	  P.setPause(speed);
	  frameDelay = speed;
      PRINT("\nChanged speed to ", P.getSpeed());
    }
  }
}
#endif // USE_UI_CONTROL

void setup(void)
{
  Serial.begin(57600);
  PRINTS("[Parola Demo]");

#if USE_UI_CONTROL
  pinMode(SPEED_IN, INPUT);
  doUI();
#endif // USE_UI_CONTROL

  P.begin();
  P.setInvert(false);
  P.displayText(pc[curText], MD_Parola::CENTER, SPEED_TIME, PAUSE_TIME, effect[inFX], effect[outFX]);
}

void loop(void)
{
#if USE_UI_CONTROL
	doUI();
#endif // USE_UI_CONTROL

  if (P.displayAnimate()) // animates and returns true when an animation is completed
  {
    // Set the display for the next string.
    curText = (++curText) % ARRAY_SIZE(pc);
    P.setTextBuffer(pc[curText]);

    // When we have gone back to the first string, set a new exit effect
    // and when we have done all those set a new entry effect.
    if (curText == 0)
    {
      outFX = (++outFX) % ARRAY_SIZE(effect);
      if (outFX == 0)
	  {
        inFX = (++inFX) % ARRAY_SIZE(effect);
		if (inFX == 0)
			P.setInvert(!P.getInvert());
	  }
        
      P.setTextEffect(effect[inFX], effect[outFX]);
    }

    // Tell Parola we have a new animation
    P.displayReset();
  }
}

please use code tags - # button above smileys. You can modify your original post.

Could always use a mirror 8)

I don't think this is a software problem. What hardware are you using - generic modules or specific Parola hardware?

How have you connected the chain of modules (in your video is the input on the right or the left)? Generally Parola hardware has the input on the right hand side of the chain, as per the YouTube video.

Thanks for replies.
I see, it might be true the module is inappropriate. I will check it and maybe I will find proper codes for my module.

Generic modules are ok as long as you change the compile time switch in the MD_MAX72xx library as per the library documentation.

I also faced same fault .
what is the proper solution for that ?

@alhootti - what hardware are you using?

Im using led matrix 8*8 common cathode using max7219

see http://m.ebay.com/itm/370863235471?nav=VI&sbk=1

See also

http://m.ebay.com/itm/171048735052?cmd=VIDESC

These modules are definitely ok. You need to have the 7219 IC at the top and set USE_PAROLA_HARDWARE define appropriately (look at the documentation included with MD_MAX72xx library). Also look at the main Parola thread at http://forum.arduino.cc/index.php?topic=171056.0

thank you soo much
the problem has been resolved
i appreciate your cooperation .

alhootti:
thank you soo much
the problem has been resolved
i appreciate your cooperation .

How you solved it?

For me the text is mirrored. How was the problem solved?

I think most of the resolution comes from actually reading the documentation that comes with the MD_MAX72xx library. There is an extensive section that tells you how to configure the library to work with different hardware types.

Matrix modules are wired in different ways. If the library knows how it is wired it will work ok.

Please also note that the IN side for the modules is on the right hand side (ie, modules are numbered 0 to n from the right and data IN is on the rightmost module).

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

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.

1 Like

For future reference in this thread:

my texts are reversed ~ please help !!~

LED DOT MATRIX SCROLLING TEXT DISPLAY - YouTube (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

Since version 3 the module type is in the sketch. Look for it at the top of the file where the object is instantiated.