WLED's ledmap.json remaps physical LED order to any logical layout
WLED firmware lets you decouple the physical wiring order of an LED strip from the logical order it addresses. You create a file called ledmap.json on the device (via the /edit page) containing a map array: the position in the array represents the natural (physical) LED index, and the value at that position is the new logical target index. This lets you treat a continuously soldered strip as if it were wired in any arrangement — including serpentine rows, matrices (add width/height keys), or irregular shapes — without rewiring hardware. Positions are zero-indexed; positions with no LED use -1. One footgun: the ArduinoJSON parser is whitespace-sensitive, so malformed spacing silently breaks the file.
Examples
Serpentine 4×3 grid: {"map":[0,1,2,3,7,6,5,4,8,9,10,11],"width":4,"height":3}. Physical run goes left-right on row 0, right-left on row 1, left-right on row 2; the map corrects this so every pixel is addressed in reading order.
Assessment
Given a 3-row serpentine strip (row 0: LEDs 0-3 L→R; row 1: LEDs 4-7 R→L; row 2: LEDs 8-11 L→R), write the complete ledmap.json that makes WLED address all 12 pixels in left-to-right, top-to-bottom order.