Led Mapping Help

Hello guys,

WLED works grate for me without any issue. I am really grateful to the project because saved me lot of time.

I am facing one issue , my project is a 3d printed tree which is 160 cm high and 140 cm width, i am using WS2812B Led strip , with total 232 leds.

What i need is to create 2 groups for leaves and tree , one group will be the trunk and branches and the second one will be the leaves :

group tree and branches [] = {0 ,1 ,2 ,3 ,4 ,5 ,6 ,7 ,9 ,11 ,12 ,14 ,15 ,16 ,17 ,21 ,22 ,24 ,28 ,32 ,33 ,34 ,35 ,36 ,38 ,42 ,48 ,52 ,54 ,56 ,59 ,61 ,62 ,63 ,64 ,65 ,67 ,70 ,71 ,73 ,74 ,75 ,78 ,79 ,80 ,87 ,90 ,95 ,97 ,98 ,99 ,100 ,106 ,108 ,116 ,118 ,121 ,123 ,125 ,126 ,129 ,131 ,133 ,134 ,136 ,139 ,140 ,142 ,148 ,152 ,153 ,158 ,164 ,165 ,166 ,167 ,170 ,172 ,174 ,176 ,182 ,183 ,187 ,190 ,196 ,199 ,204 ,206 ,207 ,208 ,209 ,213 ,214 ,215 ,216 ,217 ,218 ,220 ,224 ,226 ,227 ,230 ,231 ,232};

group leaves[] = {8 ,10 ,13 ,18 ,19 ,20 ,23 ,25 ,26 ,27 ,29 ,30 ,31 ,37 ,39 ,40 ,41 ,43 ,44 ,45 ,46 ,47 ,49 ,50 ,51 ,53 ,55 ,57 ,58 ,60 ,66 ,68 ,69 ,72 ,76 ,77 ,81 ,82 ,83 ,84 ,85 ,86 ,88 ,89 ,91 ,92 ,93 ,94 ,96 ,101 ,102 ,103 ,104 ,105 ,107 ,109 ,110 ,111 ,112 ,113 ,114 ,115 ,117 ,119 ,120 ,122 ,124 ,127 ,128 ,130 ,132 ,135 ,137 ,138 ,141 ,143 ,144 ,145 ,146 ,147 ,149 ,150 ,151 ,154 ,155 ,156 ,157 ,159 ,160 ,161 ,162 ,163 ,168 ,169 ,171 ,173 ,175 ,177 ,178 ,179 ,180 ,181 ,184 ,185 ,186 ,188 ,189 ,191 ,192 ,193 ,194 ,195 ,197 ,198 ,200 ,201 ,202 ,203 ,205 ,210 ,211 ,212 ,219 ,221 ,222 ,223 ,225 ,228 ,229};

The problem is the sequence , so when i try to make the groups with segments ,

segments limitation does not let me create all the segments that i need to do create…

Does anyone have any idea how can increase segment number?

You can see some sample of what i have so far here : https://bit.ly/tree363

Any help wild be appreciated.

You should be able to put that custom mapping into the code. There is an array that you can edit in fx_fcn.cpp :wink:

#ifdef WLED_CUSTOM_LED_MAPPING
//this is just an example (30 LEDs). It will first set all even, then all uneven LEDs.
const uint16_t customMappingTable[] = {
  0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28,
  1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29};
1 Like

Thank you for the reply @tonyno , how can i create 2 groups?

Now i figure it out! First the wood and then the leaves for my case.

{0, 1, 2, 3, 4, 5, 6, 7, 9, 11, 12, 14, 15, 16, 17, 21, 22, 24, 2, 32, 33, 34, 35, 36, 38, 42, 48, 52, 54, 56, 59, 61, 62, 63, 64, 65, 67, 70, 71, 73, 74, 75, 78, 79, 80, 87, 90, 95, 97, 98, 99, 100, 106, 108, 116, 118, 121, 123, 125, 126, 129, 131, 133, 134, 136, 139, 140, 142, 148, 152, 153, 158, 164, 165, 166, 167, 170, 172, 174, 176, 182, 183, 187, 190, 196, 199, 204, 206, 207, 208, 209, 213, 214, 215, 216, 217, 218, 220, 224, 226, 227, 230, 231, 232, 8, 10, 13, 18, 19, 20, 23, 25, 26, 27, 29, 30, 31, 37, 39, 40, 41, 43, 44, 45, 46, 47, 49, 50, 51, 53, 55, 57, 58, 60, 66, 68, 69, 72, 76, 77, 81, 82, 83, 84, 85, 86, 88, 89, 91, 92, 93, 94, 96, 101, 102, 103, 104, 105, 107, 109, 110, 111, 112, 113, 114, 115, 117, 119, 120, 122, 124, 127, 128, 130, 132, 135, 137, 138, 141, 143, 144, 145, 146, 147, 149, 150, 151, 154, 155, 156, 157, 159, 160, 161, 162, 163, 168, 169, 171, 173, 175, 177, 178, 179, 180, 181, 184, 185, 186, 188, 189, 191, 192, 193, 194, 195, 197, 198, 200, 201, 202, 203, 205, 210, 211, 212, 219, 221, 222, 223, 225, 228, 229};

This way you make your own custom mapping in general!

Thank you very much @tonyno

1 Like