How to use led-mapper with effects written using the traditional XY() mapping function #4
Replies: 2 comments 3 replies
-
Hey, it's not terribly efficient, but you could create an XY function, equivalent to the XYMatrix example, like this: uint16_t XY(uint8_t x, uint8_t y) {
for (uint16_t i = 0; i < NUM_LEDS; i++) {
if (coordsX[i] == x && coordsY[i] == y)
return i;
}
return -1;
} Alternatively, you could create the XY function in any other way you see fit, including Garrett Mace's mapper and use multiple different mapping methods in the same sketch. You can see how I mapped the surface of a cube with six 8x8 panels here: https://github.com/jasoncoon/esp8266-fastled-webserver/blob/ultim8x8-cube/Map.h#L1 ULTiM8x8 Cube + FastLED + ESP8266 Web Server Good luck! Can't wait to see what you come up with! |
Beta Was this translation helpful? Give feedback.
-
Hey Jason - Just a thought for those using multiple methods of XY lookups as well as LED offset that your tool does so well. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, I was searching the internet for a tool to map FastLED effects to my cube-shaped WS2812B project and your led-mapper looks great. Unfortunately, I'm confused about how to use it with effects that have been written using the "traditional" method of providing an XY() function to map a matrix of LEDs (like the FastLED XYMatrix, SmartMatrix and some of the Noise example sketches).
My cube is made of 5 8x8 WS2812B panels, with the 320 LEDs laid out in led-matrix as a 24x24 matrix like this:
Since led-mapper throws away info about missing LEDs in the matrix, it seems that it couldn't be used for XY() style mapping. Or am I missing something?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions