s-marley / ESP32_FFT_VU

A spectrum analyzer VU meter for the ESP32 and a FastLED matrix
Other
274 stars 67 forks source link

Modify code for FastLED_NeoMatrix to enable Tiled Matrixes, Zig-Zag #5

Closed VonHirsch closed 3 years ago

VonHirsch commented 3 years ago

Thanks for this base code. I wanted to use this with a few of my 8x32 chained together, so I ported the code to FastLED_NeoMatrix and its working nicely. See https://github.com/marcmerlin/FastLED_NeoMatrix for more info. It's basically a FastLED-compatible library for NeoPixel that supports multiple orientation / configurations of panels and panel tiles:

image

s-marley commented 3 years ago

Quickly tested this on my matrix and there are a few issues which I'm sure wouldn't be that hard to fix, I just don't have time at the moment. The peak dots seem to have disappeared, and the bars are now rotated at 90 degrees with your code, but that's obviously because it's set up for your particular matrix wiring.

I then changed the neomatrix definition to:

FastLED_NeoMatrix *matrix = new FastLED_NeoMatrix(leds, kMatrixWidth, kMatrixHeight,
  NEO_MATRIX_TOP  + NEO_MATRIX_LEFT +
  NEO_MATRIX_ROWS + NEO_MATRIX_ZIGZAG);

which should be correct for my setup (input top left, horizontal zigzag) but then the bars disappear completely as my original code moved the coordinate origin to the bottom left. On the neomatrix the origin is always top left if I remember correctly. This would mean changing the code for the patterns to compenste for this.

Either way, I've merged it into a new branch, if I have time to look at it properly at some point then I might merge the two branches. For now, I''ll put a link in the README to your fork for anyone who is interested.

Thanks for submitting the PR!

VonHirsch commented 3 years ago

Cool thanks for merging! I too noticed that the EQ seems "upside down" due to the issue you pointed out above regarding the difference in coordinate mapping (origin in upper left) - I also fixed the peak last night (it was just a color setting.) I'll try to submit another PR when I get these issues ironed out.