Ok, thanks guys.
I put the table into the progmem and it works now. However I ran into another problem.
int myTable [] PROGMEM = {
#include "table.h"
};
int i=0;
void setup(){
Serial.begin(9600);
i=0;
}
void loop(){
i=999;
Serial.println(myTable[i]);
delay(200);}
This code works fine, it just prints the thousandth value over and over again.
This however
int myTable [] PROGMEM = {
#include "table.h"
};
int i=0;
void setup(){
Serial.begin(9600);
i=0;}
void loop(){
i=0;
while(i<4000)
{Serial.println(myTable[i]);
delay(200);
i++;}
}
This should print all the values one by one, but it doesn't. It just prints 'random' numbers.