This is one of the most bizarre things I've ever seen, how and why is a INT being reset back to zero by the thing that’s using it ?
Declared at the top of the page
const uint8_t PIX_COUNT = 5;
const uint8_t FRAMES = PIX_COUNT;
const uint8_t CHANNELS = PIX_COUNT * 3;
uint8_t FX[FRAMES][CHANNELS];
uint32_t FX_F = 0;
This will work
void loop() {
for (int f = 0; f < FRAMES; f++) {// loops through creating each frame
for (int c = 0; c < CHANNELS; c++) { // loop through creating each channel
uniData[c] = FX[f][c];
}
Serial.println(FX_F);
delay(100)
}
This will not, FX_F is always zero
void loop() {
for (int c = 0; c < CHANNELS; c++) { // loop through creating each channel
uniData[c] = FX[FX_F][c];
}
delay(100);
FX_F++;
if (FX_F == FRAMES) {
FX_F = 0;
}
Serial.println(FX_F);
}
I have determined that uniData
= FX[FX_F][c]; is resetting the FX_F back to zero?
How, that makes not seance at all?
thanks
Brian