LED Matrix Orientation using DotStarMatrix Library

So, I can’t seem to get the orientation to change on a 8x8 LED Matrix display.

From what I gather in the documentation, I should be able to set any corner as the 0 pixel, thereby allowing for setting the orientation of the matrix as we wish. The library says you can change to top/bottom, left/right, rows/columns, etc. But nothing seems to change at all when I adjust this.

I’m using this display: Adafruit DotStar High Density 8x8 Grid - 64 RGB LED Pixel Matrix : ID 3444 : $24.95 : Adafruit Industries, Unique & fun DIY electronics and kits

This is (or should be) done using DS_MATRIX_LEFT or DS_MATRIX_RIGHT as needed. But it’s not working for me. What am I doing wrong?

To explain, I’m using this 8x8 display as an indicator for a sensor pointing in the oposite direction. If they were both pointing the same way, it would look great using the default settings. However, when turning the display so the user can see it, naturally, everything is mirrored in the wrong direction. So, I need to swap the orientation of the LEDs.

I hope that explains things well.

CODE below (simplified to narrow down the problem)

#include <SPI.h>
#include <Adafruit_GFX.h>
#include <Adafruit_DotStarMatrix.h>
#include <Adafruit_DotStar.h>

#define DATAPIN  4
#define CLOCKPIN 5

Adafruit_DotStarMatrix matrix = Adafruit_DotStarMatrix(
  8, 8, DATAPIN, CLOCKPIN,
  DS_MATRIX_TOP + DS_MATRIX_LEFT + DS_MATRIX_ROWS + DS_MATRIX_ZIGZAG,
  DOTSTAR_BRG);

  uint32_t MatrixRed = matrix.Color(100, 0, 0);     //GRB

void setup() {
  matrix.begin();

}

void loop() {
  
// TESTING MATRIX STUFF --------------------------------------------------------------
      matrix.setPixelColor(0, MatrixRed);
      matrix.show();
      delay(100);
      matrix.setPixelColor(1, MatrixRed);
      matrix.show();
      delay(100);
      matrix.setPixelColor(2, MatrixRed);
      matrix.show();
      delay(100);
      matrix.setPixelColor(3, MatrixRed);
      matrix.show();
      delay(100);
      matrix.setPixelColor(4, MatrixRed);
      matrix.show();
      delay(100);
      matrix.setPixelColor(5, MatrixRed);
      matrix.show();
      delay(100);
      matrix.setPixelColor(6, MatrixRed);
      matrix.show();
      delay(100);
      matrix.setPixelColor(7, MatrixRed);
      matrix.show();
      delay(100);
      matrix.setPixelColor(8, MatrixRed);
      matrix.show();
      delay(100);
      matrix.setPixelColor(9, MatrixRed);
      matrix.show();
      delay(100);
      matrix.setPixelColor(10, MatrixRed);
      matrix.show();
      delay(100);
      matrix.setPixelColor(11, MatrixRed);
      matrix.show();
      delay(100);
      matrix.setPixelColor(12, MatrixRed);
      matrix.show();
      delay(100);
      matrix.setPixelColor(13, MatrixRed);
      matrix.show();
      delay(100);
      matrix.setPixelColor(14, MatrixRed);
      matrix.show();
      delay(100);
      matrix.setPixelColor(15, MatrixRed);
      matrix.show();
      delay(100);
      matrix.setPixelColor(16, MatrixRed);
      matrix.show();
      delay(100);
      matrix.setPixelColor(17, MatrixRed);
      matrix.show();
      delay(100000000);
                
// ---------------------------------------------------------------------------------------------

}

The LEDs always light up from top left (or however it’s oriented by default) no matter what I change the ‘DS_MATRIX’ variable to.