Mirror screen content

Hey guys,
I’m new here and have a question. I managed to wire up an ESP32 with a 64x32 matrix and it works very well. Unfortunately, I am missing a feature: mirroring. The display should displaying correctly when looked at through a mirror. Is this possible with SmartMatrix? I already began with mrfaptastic’s HUB75 + EPS32 library, but it does not support mirroring as well.
Thank you a lot! If something’s unclear, please ask!
jokur

SmartMatrix supports user-configurable rotations in 90° increments. Internally, it can mirror panels vertically too, but this isn’t exposed to the user configuration.

Depending on what you are rendering, it may be straightforwards to adapt the sketch to do the mirroring. I’d be happy to take a look at that if you’re stuck for ideas.

1 Like

Hey sutaburosu, thanks a lot for your response! Good to know that there is indeed a way to implement rotation. Unfortunately, I would not know where to look exactly. Could you give me a hint?

If it helps, the application I am designing is for displaying and frequently updating text and values which are retrieved from sensors. I guess this is not as straightforward as displaying bitmaps or simple geometries. I already thought about importing a reversed font and writing from right to left, but that feels like a lot of work.

Rotation is easy to configure, but I think you may want to mirror horizontally. I’m not aware of any simple way to do this; I think it will have to be expressed in your own sketch’s code.

How are you plotting the text? Are you using SmartMatrix’s scrolling layers, or some other library?

1 Like

Hey sutaburosu!
I have not written the code for the display yet, as I want to be sure that mirroring will work before investing time. I intended to use the same functions as in the Feature Demo sketch, e.g. backgroundlayer.drawString(). If you have a suggestion for a different library for plotting text, I’m open to every idea!

I took a quick look at modifying SmartMatrix to mirror the X-axis. As this is an experiment, I abused the rotate180 configuration to reduce the changes needed. I only had to modify a handful of lines in SmartMatrix. After adding matrix.setRotation(rotation180); to setup(), FeatureDemo seems to be working OK like that.

If there is a desire for this, it seems straightforward to add X- or Y-mirroring to SmartMatrix properly, rather than this hacky method.

1 Like

Wow, it works! That’s awesome, thank you, this was incredibly helpful! :smiley:

1 Like