problem with font array FONT6x8[97][8]


a have procedure lcdputchar. in run time, can not read array element values.

void lcdputchar(char c, int x, int y, int size, int fcolor, int bcolor)
{
 
 int cc;
 int indx = int(c)-33;
   
 //serial.println(c);
 for (int r=0; r<8; r ++)
 {
  int rchar = font6x8[indx][r];
  serial.println(rchar );
 }
}

--------------------------------------
unsigned char font6x8[97][8] = {
{0x06,0x08,0x08,0x00,0x00,0x00,0x00,0x00}, // columns, rows, num_bytes_per_char
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // space 0x20
{0x20,0x20,0x20,0x20,0x20,0x00,0x20,0x00}, // !
{0x50,0x50,0x50,0x00,0x00,0x00,0x00,0x00}, // "
{0x50,0x50,0xf8,0x50,0xf8,0x50,0x50,0x00}, // #
{0x20,0x78,0xa0,0x70,0x28,0xf0,0x20,0x00}, // $
{0xc0,0xc8,0x10,0x20,0x40,0x98,0x18,0x00}, // %
..............................................
..............................................
..............................................
}

perhaps should serial.print more data, indx , r.

perhaps should print rchar number, rather converting string. use dec 2nd argument print() function.


Arduino Forum > Forum 2005-2010 (read only) > Software > Syntax & Programs > problem with font array FONT6x8[97][8]


arduino

Comments

Popular posts from this blog

CAN'T INSTALL MAMBELFISH 1.5 FROM DIRECTORY - Joomla! Forum - community, help and support

error: expected initializer before 'void'

CPU load monitoring using GPIO and leds - Raspberry Pi Forums