So, I resized the image, to 5760 bytes, and is still dont working.
I took out the <avr/pgmspace.h> line, and is still not working.
I have tried the examples that came in the UTFT library, and printing the info.c, tux.c, and the icon.c inluded it works.
I ony had to replace the unsigned int for unsigned short, and it works charming.
// UTFT_Bitmap (C)2012 Henning Karlsen
// web: http://www.henningkarlsen.com/electronics
//
// This program is a demo of the drawBitmap()-function.
//
// This demo was made to work on the 320x240 modules.
// Any other size displays may cause strange behaviour.
//
// This program requires the UTFT library.
//
#include <UTFT.h>
#include <avr/pgmspace.h>
// Declare which fonts we will be using
extern uint8_t SmallFont[];
// Uncomment the next line for Arduino 2009/Uno
//UTFT myGLCD(ITDB32S,19,18,17,16); // Remember to change the model parameter to suit your display module!
// Uncomment the next line for Arduino Mega
UTFT myGLCD(CTE35IPS,25,26,27,28); // Remember to change the model parameter to suit your display module!
extern unsigned short info[0x400];
extern unsigned short icon[0x400];
extern unsigned short tux[0x400];
void setup()
{
myGLCD.InitLCD();
myGLCD.setFont(SmallFont);
}
void loop()
{
myGLCD.fillScr(255, 255, 255);
myGLCD.setColor(255, 255, 255);
myGLCD.print(" *** A 10 by 7 grid of a 32x32 icon *** ", CENTER, 228);
for (int x=0; x<10; x++)
for (int y=0; y<7; y++)
myGLCD.drawBitmap (x*32, y*32, 32, 32, info);
delay(5000);
myGLCD.fillScr(255, 255, 255);
myGLCD.setColor(255, 255, 255);
myGLCD.print(" Two different icons in scale 1 to 4 ", CENTER, 228);
int x=0;
for (int s=0; s<4; s++)
{
x+=(s*32);
myGLCD.drawBitmap (x, 0, 32, 32, tux, s+1);
}
x=0;
for (int s=4; s>0; s--)
{
myGLCD.drawBitmap (x, 224-(s*32), 32, 32, icon, s);
x+=(s*32);
}
delay(5000);
I also notice, that if I inlcude one of those files into my code. It, works, what is making me absolute crazy.
The only diference I catch, is that in the first line of the .c file, the numbers between the []s, are, in my files that I have converted with the UTFT converter, in digital ([15600],[2880]etc), and in the files that are working, them came in hexadecimal [0x400]); have this any sense???