Again with other problem, I don't know what happend, with one graphics run ok, when I put another small doesn't display correctly.
I show the code
The code read as vertical and the output code as horizontal for both images. http://javl.github.io/image2cpp/
bitmap.c
I show the code
The code read as vertical and the output code as horizontal for both images. http://javl.github.io/image2cpp/
Code:
#include <SPI.h>
#include <TFT_ILI9163C.h>
#include <avr/pgmspace.h>
extern uint8_t sinagua[];
extern uint8_t todook[];
// All wiring required, only 3 defines for hardware SPI on 328P
#define __DC 9
#define __CS 10
#define __RST 12
// Color definitions
#define BLACK 0x0000
#define BLUE 0x001F
#define RED 0xF800
#define GREEN 0x07E0
#define CYAN 0x07FF
#define MAGENTA 0xF81F
#define YELLOW 0xFFE0
#define WHITE 0xFFFF
TFT_ILI9163C tft = TFT_ILI9163C(__CS, __DC, __RST);
void setup() {
tft.begin();
draw();
}
void loop(){
}
unsigned long draw() {
tft.clearScreen();
tft.setCursor(0, 0);
tft.setTextColor(WHITE);
tft.println("Without water");
tft.drawBitmap(10, 10, sinagua, 48, 48, WHITE);
tft.drawBitmap(80, 10, todook, 38, 38, WHITE); //<<-- this is the small that fail
delay(100);
}
bitmap.c
Code:
#include <avr/pgmspace.h>
const unsigned char sinagua [] PROGMEM = {
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x01, 0x60, 0x00, 0x00, 0x00,
0x00, 0x03, 0x30, 0x00, 0x00, 0x00, 0x00, 0x06, 0x18, 0x01, 0xff, 0xff, 0x00, 0x0c, 0x0c, 0x01,
0xff, 0xff, 0x00, 0x18, 0x06, 0x01, 0xff, 0xff, 0x00, 0x30, 0x03, 0x01, 0xff, 0xff, 0x00, 0x60,
0x01, 0x80, 0xc3, 0x86, 0x00, 0xc0, 0x00, 0xc0, 0x03, 0x80, 0x01, 0x80, 0x00, 0x60, 0x03, 0x80,
0x03, 0x00, 0x00, 0x30, 0x03, 0x80, 0x06, 0x00, 0x00, 0x18, 0x03, 0x80, 0x0c, 0x00, 0x00, 0x0c,
0x0f, 0xe0, 0x18, 0x00, 0x00, 0x06, 0x3f, 0xf8, 0x30, 0x00, 0x00, 0x03, 0x3f, 0xf8, 0x60, 0x70,
0x00, 0x01, 0x9f, 0xf0, 0xc0, 0x70, 0x00, 0x00, 0xdf, 0xf9, 0x80, 0x70, 0x00, 0x00, 0x7f, 0xfb,
0x01, 0xf0, 0x00, 0x00, 0x3f, 0xfe, 0x01, 0xf0, 0x00, 0x00, 0x3f, 0xfc, 0x01, 0xf0, 0x00, 0x00,
0xff, 0xfe, 0x01, 0xf0, 0x00, 0x0f, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x3f, 0xff, 0xff, 0xff, 0xf0,
0x00, 0x7f, 0xff, 0xff, 0xff, 0xf0, 0x00, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x01, 0xff, 0xff, 0xff,
0xff, 0xf0, 0x03, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x03, 0xfc, 0x7f, 0xff, 0xff, 0xf0, 0x07, 0xf8,
0x3f, 0xfc, 0x01, 0xf0, 0x07, 0xf0, 0x63, 0xc6, 0x01, 0xf0, 0x07, 0xe0, 0xc0, 0x03, 0x01, 0xf0,
0x0f, 0xf1, 0x80, 0x01, 0x80, 0x70, 0x0f, 0xf3, 0x00, 0x00, 0xc0, 0x70, 0x07, 0xe6, 0x00, 0x00,
0x60, 0x70, 0x00, 0x0c, 0x00, 0x00, 0x30, 0x00, 0x00, 0x18, 0x00, 0x00, 0x18, 0x00, 0x00, 0x30,
0x00, 0x00, 0x0c, 0x00, 0x00, 0x60, 0x00, 0x00, 0x06, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x03, 0x00,
0x01, 0x80, 0x00, 0x00, 0x01, 0x80, 0x03, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x06, 0x00, 0x00, 0x00,
0x00, 0x60, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x30, 0x18, 0x00, 0x00, 0x00, 0x00, 0x18, 0x30, 0x00,
0x00, 0x00, 0x00, 0x0c, 0x60, 0x00, 0x00, 0x00, 0x00, 0x06, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x03,
};
const unsigned char todook [] PROGMEM= {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xfc, 0x00, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x00, 0x3e,
0x00, 0x3e, 0x00, 0x00, 0xf8, 0x00, 0xf8, 0x00, 0x1c, 0x00, 0x00, 0x1c, 0x00, 0x70, 0x00, 0x00,
0x70, 0x01, 0xc0, 0x00, 0x01, 0xc0, 0x18, 0x00, 0x00, 0x00, 0xc0, 0x60, 0x00, 0x00, 0x03, 0x01,
0x83, 0xe0, 0x3e, 0x0c, 0x06, 0x0f, 0x80, 0xf8, 0x30, 0x18, 0x3e, 0x03, 0xe0, 0xc1, 0x80, 0xf8,
0x0f, 0x80, 0xc6, 0x03, 0xe0, 0x3e, 0x03, 0x18, 0x00, 0x00, 0x00, 0x0c, 0x60, 0x00, 0x00, 0x00,
0x31, 0x80, 0x00, 0x00, 0x00, 0xc6, 0x00, 0x00, 0x00, 0x03, 0x18, 0x00, 0x00, 0x00, 0x0c, 0x60,
0x00, 0x00, 0x00, 0x31, 0x80, 0x00, 0x00, 0x00, 0xc6, 0x0c, 0x00, 0x01, 0x83, 0x18, 0x30, 0x00,
0x06, 0x0c, 0x18, 0x38, 0x00, 0xe0, 0xc0, 0x60, 0xe0, 0x03, 0x83, 0x01, 0x83, 0x80, 0x0e, 0x0c,
0x06, 0x01, 0xff, 0xc0, 0x30, 0x18, 0x07, 0xff, 0x00, 0xc0, 0x1c, 0x00, 0x00, 0x1c, 0x00, 0x70,
0x00, 0x00, 0x70, 0x01, 0xc0, 0x00, 0x01, 0xc0, 0x00, 0xf8, 0x00, 0xf0, 0x00, 0x03, 0xe0, 0x03,
0xc0, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x00, 0x01, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00,
};
Last edited: