I have some arrays defining the RGB values for some LEDs (these are only example values below) :
const int scheme1[30] = {
- 4095,0,0,4095,0,0,4095,0,0,4095,0,0,4095,0,0,4095,0,0,4095,0,0,4095,0,0,4095,0,0,4095,0,0};*
const int scheme2[30] = { - 0,4095,66,0,4095,0,0,4095,0,0,4095,0,0,4095,0,0,4095,0,0,4095,0,0,4095,0,0,4095,0,0,4095,0};*
etc. up to scheme10
These work fine if I reference the specific array manually, but I want be able to cycle the scheme I am currently using with a button press eg:
[button press] [if currentscheme=scheme1 then currentscheme=scheme2 .. if currentscheme=scheme10 then currentscheme=scheme1 etc.]
So I can then reference a value in the array:
currentscheme[value x] so in the instance where I am currently using scheme2 (because the button was pressed once since reset), and x was 3, the value returned would be 66 in this example.
I am not sure how to do this, because I cant seem to store the name of the array as a variable (currentscheme=scheme1 etc.) Is this correct?
I THINK an alternative may be to use pointers, but I am having trouble expanding on this - can anyone help? Maybe I am going about this in the wrong way.