Home Forums Game Frame General Discussion Arduino code and pinout Reply To: Arduino code and pinout

#4711
Jacek
Participant

Hi,

There are two more comments:

#5 (update): to get the GFv1 code working debug mode has to be set as true:

const boolean debugMode = true;

– then the code fit to 94% of memory of Arduino

#7 if you use ledstrip soldered as a rows (end of the row is soldered with the begining of the next row) you’ll need to change getIndex functions as follows:

byte getIndex(byte x, byte y)
{
  byte index;
  if (y == 0)
  {
    index = x;
  }
  else if (y % 2 != 0)
  {
    index = y * 16 + x;
  }
  else
  {
    index = (y * 16 ) + x;
  }
  return index;
}

Regards!
Jacek