Hi, everyone. i'm recently using a TFT screen to do some work. I need to put several image,which are converted to arrays in forms like(prog_uint16_t image_baby[0x6E4] PROGMEM ={...}),into flash memory.
The size of arrays vary from 3kByte to 46kByte, and there are 12 of them. The total size is less than 100kB.
When i put about 8 of them into my sketch, everything works fine.
However, if i put one more array into the program, strange thing happens.The sketch would compile and upload, but arduino does not act as expected. I note that the LED on arduino(pin 13?) is blinking at about 2Hz.
Why does this happen and How to fix this?
I am using 1.0.5 ,OSX and Mega2560,display uses UTFT library
Later i tried the 1.5.x version,but it seems to change the way of putting things into PROGMEM. the old sketch would not compile, and the comments in avr/progmem.h says the method of prog_uint16_t image_baby[0x6E4] PROGMEM ={...} is deprecated. But what is the new way? i seem not to find much useful data.
thanks to pyro_65,now i can compile on 1.5.8. Now the sketch would compile and run. If i only try to display 8 pictures, everything works fine. However,if i try to display exactly one more, all the display function does not work. but other function like Serial.println works fine.
here is part of my code.The whole program is a little complicated and large to be put here,but if they are needed i shall post as well.
Thank everyone in advance!!
project.ino
//numerous images...
#include "baby.h"
#include "dad.h"
#include "eat.h"
#include "name.h"
#include "one.h"
#include "two.h"
#include "three.h"
#include "four.h"
#include "five.h"
#include "six.h"
#include "seven.h"
#include "eight.h"
baby.h
// Generated by : ImageConverter 565 v2.1
// Generated from: (4).bmp
// Time generated: 2014/12/28 19:41:34
// Dimensions : 54x67 pixels
// Size : 7,236 Bytes
#include <avr/pgmspace.h>
prog_uint16_t wrd_baby [0xE22] PROGMEM ={
0xFFFF, 0xFFFF, 0xFFFF, ....... };