Greetings!
Im trying to read about 19200 bytes from a camera and write them to the progmem of the avr. here are the important code snipets.
PROGMEM byte buffer[19200];
byte* image=&buffer[0];
unsigned long timeout = 6000;//time until picture is transfered
unsigned long time = millis();
long memCnt=0;
while( millis() - time <= timeout )
{
while( Serial.available() > 0 )
{
image[byteCnt] = Serial.read();
byteCnt++;
}
}
Can this even work? any suggestions other then an external memory?
There is no error, but since there is no way of debugging the incoming picture, i'm not sure if the received data is my image or just data from the progmem.
Thanks in Advance