Variable not increasing2

the same question was found at stackoverflow last night...

That happens a lot.

Link, please


Do not hijack other questions with your own, start a new topic.

Please read the forum guidelines before posting anything else:

Thank you

flowin= pgm_read_word(&flowinTable[i]);

It works with a constant index because the compiler knows the value at that index and uses the value directly. Only when variable indexes are used does it fetch the data from the array. The compiler doesn't keep track of which values are in RAM and which are in PROGMEM so it is up to the programmer to add the "pgm_read_..." functions when reading from the PROGMEM address space.