Scrolling Text is mirror image

I modified the files necessary to change the origin from R0C0 to R0C31 (my display) using provided panel map. But there is no change.
Text (from MultipleTextLayers.ino) still is mirror image. I know this because when I look at it with a mirror, it reads correctly!
Right now I made Layer2 text scroll left and right. This will be my test case.
Any ideas what I should do now?
I was given {0,31,-32},
as a new panel configuration. I’ll try fooling with these numbers.

Well I tried a number of things, changing the numbers for the panel config, but conceed that {0,31,-32} SHOULD work. I played around to get something different, but no change. Using the ModeMapTesting function, the LED starts at top right (R0, C31) and moves Right to Left. Text is still mirror image. I may have to abandon this and go back to Adafruit GFX (works with Atmega 328, but not with Teensy3.2, so would require a major redesign), if I want scrolling text. I could bit-bang and get static text, but I was hoping the scrolling layer would work…so many possibilities there. Can someone explain how the scrolling layer works, or how I can access the code to maybe make it work in reverse? I would have thought this was simple…just start the scroll at a different origin, and in my case reverse the string, go from 31 to 0 in instead of 0 to 31.

It seems like the panel mapping isn’t being applied for some reason. Can you purposely break the mapping and see that the output is broken to verify that you’re actually using the mapping in your sketch?

If you commit your SmartMatrix Library changes and the sketch you’re using for text to a branch I could skim them and see if I spot an error.

I broke it by replacing 31 in panel mapping with word “junk” and it errored out on compile, stating the word…so I know my panel mapping is being accepted and used.
Here’s last 10 lines of the panel mapping entry:
const PanelMappingEntry FEMatrix[] =
{0, 31,-32},
{0, 0, 0} // last entry is all zeros

const PanelMappingEntry * getMultiRowRefreshPanelMap(unsigned char panelType) {
switch(panelType) {
return panelMap32x16Mod2;
return panelMapHub12_32x16Mod4;
return panelMap32x16Mod4;
return panelMap32x16Mod4V2;
return FEMatrix;
return defaultPanelMap;

My Panel type is …MOD8SCAN_FEMod, and the panel entry is FEMatrix.

It doesn’t matter WHAT numbers I put into the panel entry file, I get exactly the same response,
eg these gave same response as {0,31,-32}:
{31,0,-32}, {0,15,-15}, {0,31,-31}. If I put text in middle, of course I get a compile error.
Will try to upload to Git for your perusal

I committed 4 files to Github, but don’t know if I did it correctly…first time.

I made a small diagram in Excel to illustrate how my Matrix is hard-configured for origin. See attached
Screen Shot 08-03-21 at 07.52 PM
It shows the 4 corners of the display (minus all the cells in between). Note my 0,0 is top right. I determined these by using the drawPIxel command from SmartMatrix.

Do you have a link to the files?

Pretty sure this is the issue:


Your panel has PHYSICAL_ROWS_PER_REFRESH_ROW == 1, so this will be false. You could maybe change it to:

#define MULTI_ROW_REFRESH_REQUIRED ((PHYSICAL_ROWS_PER_REFRESH_ROW > 2) || (panelType == SM_PANELTYPE_HUB75_16ROW_MOD8SCAN_FEMod)) to force MultiRowRefresh to work


I was hoping…
When I insert the line you suggested, I get a bunch of these errors (only first couple shown) shown below:
In file included from D:\ArduinoSketch\libraries\SmartMatrix\src/SmartMatrix.h:213:0,
from D:\ArduinoSketch\ProjectsDoneDoing\MatrixDM13\Teensy\MultipleTextLayersFE\MultipleTextLayersFE.ino:21:
D:\ArduinoSketch\libraries\SmartMatrix\src/MatrixTeensy3Hub75Calc_Impl.h:359:5: error: stray ‘\302’ in program
D:\ArduinoSketch\libraries\SmartMatrix\src/MatrixTeensy3Hub75Calc_Impl.h:359:5: error: stray ‘\240’ in program
D:\ArduinoSketch\libraries\SmartMatrix\src/MatrixTeensy3Hub75Calc_Impl.h:438:9: error: stray ‘\302’ in program

BTW, I had changed the value of PhysicalRowsperRefresh from 1 to 2 as a test, forgot to put it back . In the line you sent me, I also tried >1, instead of >2.

Same result…test runs from right side, text is mirror-image.

As a hack just try this:


Hmmm, getting something different that is close.
Made no sense running the Refresh test, pixels lighting up randomly.
But for the “MultipleTextLayer” where I’m displaying Layer2 in a bounce I get the following:
I have 4 quadrants, each 8x8. on two levels, making up the 16x32 display. On level 1 quadrant A is blank, QB has random characters, QC has “Layer2” displaying only in that quadrant and QD has 4 static vertical lines.
Now Level 2 is interesting because in the last quadrant QD (bottom right 8x8) I can read “Layer2” properly, but only in that quadrant, not across the others.
Here’s the thing…I had a commercial (Adafruit) 16x32 display (not blown up), which I hooked up with your SmartLED shield (I had bought one for testing), and it shows EXACTLY the same display, but in mirror image!! So SOMEWHERE there is an error in code.
I then loaded the “virgin” MultipleTextLayer.ino file from the SmartMatrix examples. It works fine on the commercial display with your shield.

Could we be looking in the wrong place? I notice there are timing parameters listed in the <MatrixHardware_Teensy3_ShieldV4.h> file. Should I be dicking around with some of these? My hardware emulates the SmartLED shield with SIMILAR parts but not exactly. (I use through hole ics, your shield was smt.) I’ll try…

I tried…changing some of the parameters, sometimes drastically, to see if there was a change. None. Also changed speed of Teensy from overclocked to lowest: no change. So I don’t think I have a timing problem.
I’d like to know more about the Scrolling Layer code. That’s where the answer lies.

It’s shame that the panel mapping approach isn’t working for you. This post shows another way to horizontally mirror SmartMatrix’s layers.

I was really encouraged by all the edits I had to make (7 files, right?) because it seemed to hit the areas that I would think are related to my problem.
Made all the changes, including the revision, used the default panel type and default hardware type from SmartMatrix.
Still the same…no more, no less. Compiles and downloads but still is mirror image text. I expected SOME change.
I’ll go through the edits again. Thanks for this work btw.

UPdate: I checked every edit, found one in error, but I think it was fixed in the revision! Still, getting mirror image.

The commercial 16x32 display (Adafruit) with the Smart LED shield still displays properly, ie text is readable. I would have thought with all the changes to reverse the origin that THIS display would be mirror-image if the code was working right. I’m back to square one where I was a week or two ago.
Any more ideas?

Well, I’m happier than a pig in s***!!! After 3 weeks of struggling, I FINALLY have scrolling text presented properly! What did I do since last entry?
I went over Sutaburosu’s entry where he describes the edits to do THEN, add “matrix.setRotation(rotation180);” That’s what I was missing.
Thank you Sir!

1 Like