First up I am very new to this and most of the sketches I use are pilfered from the internet!
I have 2 8x8 LED matrices that I have scrolling text on. I want to add extra characters/images, such as a space invader.
I have added extra lines to the "char_code[xxx] [6]" list, which compiles but I can't then use them tried many ascii character list to no avail , I have also tried adding extra "byte" characters but again I can't write them...
Not sure that is very clear but here is the bit of code I am playing with (character lines omitted!):
byte char_code[100][6] = {
{B00000000, B00000000, B00000000, B00000000, B00000000, B00000000}, // space
{B01011111, B00000000, B00000000, B00000000, B00000000, B00000000}, // !
{B01111111, B00000000, B00000000, B00000000, B00000000, B00000000}, // |
{B01000001, B00110110, B00001000, B00000000, B00000000, B00000000}, // }
{B00001000, B00000100, B00001000, B00000100, B00000000, B00000000}, // ~
{B00000000, B00000000, B11111111, B11111111, B11111111, B00000000}, //
{B00111100, B11110111, B00111100, B01111000, B00000000, B00000000}, //
{B01111000, B00111100, B11110111, B00111100, B00111100, B11110111}, //
{B01111000, B00111100, B11110111, B00111100, B00111100, B11110111}, //
{B00000000, B00000000, B01111000, B00111100, B11110111, B00111100} //
};
byte invader1a[] =
{B10011000, B01011100, B10110110, B01011111, B01011111, B10110110, B01011100, B10011000};
byte invader1b[] =
{B00011000, B11011100, B00110110, B00011111, B00011111, B00110110, B11011100, B00011000};
byte invader2a[] =
{B01111000, B00111100, B11110111, B00111100, B00111100, B11110111, B00111100, B01111000};
byte invader2b[] =
{B00011110, B10111100, B01110111, B00111100, B00111100, B01110111, B10111100, B00011110};
MAX7219 dotMatrix(5, data, load, clock);
void setup()
{
dotMatrix.begin();
dotMatrix.scanlimit(0x07);
dotMatrix.decodemode(0x00);
dotMatrix.shutdown(0x01);
dotMatrix.displaytest(0x00);
dotMatrix.intensity(0x0f);
dotMatrix.noop(0x00);
dotMatrix.clear();
}
void loop()
{
setStringWithShift("All I wanted was to scroll some space invaders");
setStringWithShift("Oh Well!!!");
}