Please, help with code.

fastled-support
gplus
(варешяф рйезот) #1

Please, help with code.
I want to make some config, that I may be will change in future. I want to make easy setup for that.

Strip config would be like that (pic1)
But I cant write array with coords.
It doesn’t compille (pic2)
What I do wrong?

(Daniel Garcia) #2

You should say:

StripNum strip[TOTAL_STRIPS] = {

No -1 — what’s in the brackets is saying how many items are in the array. The error message is telling you that you are trying to put five items in an array that you declared as only having 4 items in it.

(варешяф рйезот) #3

@Daniel_Garcia I alway think, that arrays size I need to count from zero. Thats why I wrote TOTAL_STRIPS-1 (0,1,2,3,4).
While write - I’m understand )) I need to take data from array with “minus one” principle, but not to declare array’s size.
Thanks a lot!
Sorry fo disturb! )