hello everibody
I just doing my proyect, Im using a arduino mega 2560 and c[https://naylampmechatronics.com/home/140-modulo-camara-vga-ov7670.htm]Cam ov7670 ](Módulo Cámara VGA OV7670)
when compiling this code, it generates the following error:
FTKE8FZIQCMKHH5:288:25: error: size of array 'myImage' is too large
uint8_t myImage[240][320];
exit status 1
size of array 'myImage' is too large
please helme, i dont understand
the code was a attached
ArduinoBluetoothCamera.ino (6.59 KB)
76,800 bytes of image is almost 10 times larger than the 8k bytes of SRAM the Arduino MEGA has.
You will get faster and more help if you post your code as instructed in the how to use this forum-please read sticky. Many members will not download code.
Two major problems here. As johnwasser noted, there is just no way to load this into ram (8K). It won't fit in EEPROM either (4K, I think).
The second problem is that the arduino uses 16 bit pointers. As such, even if you had a place to put it, the object is simply too big - any single object has to be < 64K in size, even if it stored in the (relatively) huge FLASH memory. That's what the error message is actually trying to tell you.
If you really need that much readable, writable data, you'll either have to add some kind of memory chip (and handle all the access calculations yourself in software), or put it on an SD card and access it as a file.
Either way, you won't be able to do this with a simple array.
thanks so much MHotchin, Im trying to programer a mega 2560 with cam ov7670.
I dont understand so much about this cam, I'l continue investigating