byte matrix declaration doesnt work


hey,

i define custom chars lcd , want in folllwoing way (that can interate though array while writing lcd). @ marked position compiler complains 1st time named error.

code: [select]
byte lobster [8][8] = {{
b10000,
        b11000,
        b01000,     //          <---   error: expected unqualified-id before '[' toke
        b10000,
        b00000,
        b00111,
        b01000,
        b11000
},{       
b10011,
        ...
        b11111
},{   
        ...
},{   
b11101,
        ...
        b00000
}};


the 2nd time is:

code: [select]
byte[8] mirror_cc(in_cc byte[8]) {       //          <---   error: expected unqualified-id before '[' toke
  byte out_cc[8];
  (byte i=0; i<=7; i++) {
    byte out_cc[i]=in_cc[7-i];
  }
  return out_cc;
}


this funktion mirrors char upside down. @ both positions dont why complaining. can please me!! thanka lot :)

ps: oh yeah , call:
code: [select]
for (byte i=0; i<=7; i++) {
    lcd.createchar(i, lobster[i]);     //      <-- ?
  }

right? mean handing on byte array lcd.createchar function.

code: [select]
byte[8] mirror_cc(in_cc byte[8])
a function can not return array.

for arguments, type (byte) goes first.


Arduino Forum > Using Arduino > Programming Questions > byte matrix declaration doesnt work


arduino

Comments

Popular posts from this blog

Convierte tu Raspberry en un NAS. Firmware fvdw-sl 15.3 - Raspberry Pi Forums

How to format a Get Request

avrdude: verification error, first mismatch at byte 0x0000 0x0c != 0x62