Bitmaps


hi
can tell me going on code?
i used u8glib bitmap converter hex i`m displaying lot of dots on screen
the bitmap is
20x34px

code: [select]
#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 redraw complete screen should 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(); 
 
{
    draw();
 }
while( u8g.nextpage() );
 
  // rebuild picture after delay
  delay(1000);
}


thank you

does drawbitmap know bitmap in flash?


Arduino Forum > Using Arduino > Programming Questions > Bitmaps


arduino

Comments

Popular posts from this blog

invalid use of void expresion in FlexiTimer2 library

error: a function-definition is not allowed here before '{' token

LED Strip Code