     STAGGERED && (x % 2 != y % 2));
 }
 void setAt(uint16_t x, uint16_t y, CRGB color) {
+  uint16_t idx;
   if (FLIP_HORIZONTAL) {
     x = WIDTH - 1 - x;
   }
   if (FLIP_VERTICAL) {
     y = HEIGHT - 1 -y;
+  }
+  if (ROTATE) {
+    idx = x;
+    x = y;
+    y = idx;
   }
   if (STAGGERED) {
     if (isImaginary(x, y)) {
       return;
     }
-    uint16_t idx = x / 2 + (x % 2) * (BASE_WID + 1) + WIDTH * (y / 2);
-    if (idx >= NUM_LEDS) {
-      return;
-    }
+    idx = x / 2 + (x % 2) * (BASE_WID + 1) + PHYSICAL_WIDTH * (y / 2);
+  } else {
+    idx = ((ZIGZAG && y % 2) ? (PHYSICAL_WIDTH - 1 - x) : x) + y * PHYSICAL_WIDTH;
+  }
+  // Safety
+  if (idx < NUM_LEDS) {
     leds[idx] = color;
-  } else {
-    uint16_t idx = ((ZIGZAG && y % 2) ? (WIDTH - 1 - x) : x) + y * WIDTH;
-    if (idx < NUM_LEDS) {
-      leds[idx] = color;
-    }
   }
 }
 void fillRow(uint16_t row, CRGB color) {
-  if (FLIP_VERTICAL) {
-    row = HEIGHT - 1 - row;
-  }
-  if (STAGGERED) {
-    uint16_t start = row * WIDTH / 2;
-    uint16_t num = WIDTH / 2;
-    if (row % 2) {
-      start += 1;
-    } else {
-      num += 1;
-    }
-    if (start + num > NUM_LEDS) {
-      num = NUM_LEDS - start;
-    }
-    fill_solid(leds + start, num, color);
-  } else {
-    for (uint16_t j = 0; j < WIDTH; j++) {
-      if (row * WIDTH + j < NUM_LEDS) {
-        leds[row * WIDTH + j] = color; 
-      }
-    }
+  for (uint16_t i = 0; i < WIDTH; i++) {
+    setAt(i, row, color);
   }
 }
 void fillCol(uint16_t col, CRGB color) {
-  if (FLIP_HORIZONTAL) {
-    col = WIDTH - 1 - col;
-  }
-  if (ZIGZAG) {
-    for (uint16_t i = 0; i < HEIGHT; i++) {
-      setAt(col, i, color);
-    }
-  } else if (STAGGERED) {
-    for (uint16_t i = col / 2 + (col % 2) * (BASE_WID + 1);
-         i < NUM_LEDS; i += WIDTH) {
-      leds[i] = color;
-    }
-  } else {
-    for (uint16_t j = col; j < NUM_LEDS; j+= WIDTH) {
-      leds[j] = color;
-    }
+  for (uint16_t i = 0; i < HEIGHT; i++) {
+    setAt(col, i, color);
   }
 }
 

#endif
#define COLOR_ORDER BGR
#define CHIPSET     APA102
#define APA_MHZ 40
/* For LPD8806:
#define COLOR_ORDER BRG
#define CHIPSET     LPD8806

  FastLED.show();

#ifdef ESP32
  BLEDevice::init(BLUETOOTH_NAME);
  BLEServer* server = BLEDevice::createServer();
  bleSerial.begin(server, BLEUUID((uint16_t)0xDFB0), BLEUUID((uint16_t)0xDFB1));
  BLEDeviceID* did = new BLEDeviceID(
