Bitmaps

Hi
Can someone tell me what is going on with this code?
I used u8glib bitmap converter to hex but i`m displaying a lot of dots all over the screen
the bitmap is
20x34px

#include "U8glib.h"

//▼RGB
const byte redPin = 12;
const byte greenPin = 11;
const byte bluePin = 10;
const byte RGBbut = 52;

U8GLIB_LM6059 u8g(8, 9, 5, 7, 6);		

const uint8_t rook_bitmap[] PROGMEM = {
0x0,0xf0,0x0,0x1f,0x80,0x1,0xf8,0x0,0x1f,0x80,0x0,0xf0,0x0,0x6,0x0,0x0,0x60,0x0,0x6,0x0,
0x3c,0x63,0xc7,0xe6,0x7e,0x7e,0x67,0xe7,0xe6,0x7e,0x3c,0x63,0xc1,0x86,0x18,0x18,0x61,0x80,0xc6,0x30,
0xc,0xf3,0x0,0x6f,0x60,0x3,0xfc,0x0,0x3f,0xc0,0x3,0xfc,0x0,0x3f,0xc0,0x3,0xfc,0x0,0x3f,0xc0,
0x3,0xfc,0x0,0x3f,0xc0,0x7,0xfe,0x0,0x7f,0xe0,0x7f,0xff,0xef,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xf7,0xff,0xfe
};

void draw(void)
{
  // graphic commands to redraw the complete screen should be placed here  
  u8g.drawBitmapP( 0, 0, 20, 34, rook_bitmap);
}

void setup(void) {
   pinMode(redPin, OUTPUT);
  pinMode(greenPin, OUTPUT);
  pinMode(bluePin, OUTPUT);
}

void loop(void) 
{
  // picture loop
  u8g.firstPage();  
  do 
{
    draw();
 } 
while( u8g.nextPage() );
  
  // rebuild the picture after some delay
  delay(1000);
}

Thank you

krone12864.png

Does drawBitmap know that the bitmap is in flash?

i only changed the hex code. everything else has been from the BITMAP example.

Are you sure you have the right initialize parameters for the u8g object? As I recall, this library has dozens of initializers depending on the display being used.

i have the entire program running, just thought to add a bitmap and im stuck. Libraby bitmal example works fine, also all the other things. im not sure if my hex is ok and

u8g.drawBitmapP( 0, 0, 20, 34, rook_bitmap);

mOskit:
Can someone tell me what is going on with this code?

U8GLIB_LM6059 u8g(8, 9, 5, 7, 6); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9

Your code and the comments do not match.

If the comment would be correct, I think that the matching code should look like;

U8GLIB_LM6059 u8g(13, 11, 10, 9); // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9

forget that, does work and you can choose whatever output pins you want.
Look at the picture attached

Count the dots. Do they match the number of elements in the array? If so, it would seem that there is something wrong with the pixel placement in the display. Where is the images in the JPG come from? Does that give you a clue to the pixel addressing?

ok i`ve counted 328 pixels... how is that can help to correctly draw this bitmap where i want?