try this code and look at the Serial monitor (115200 bauds)
const byte happyFace[8][8] = {
{0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 1, 0, 0, 1, 0, 0},
{0, 0, 1, 0, 0, 1, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0},
{0, 1, 0, 0, 0, 0, 1, 0},
{0, 0, 1, 1, 1, 1, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0},
};
const byte sadFace[8][8] = {
{0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 1, 0, 0, 1, 0, 0},
{0, 0, 1, 0, 0, 1, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 1, 1, 1, 1, 0, 0},
{0, 1, 0, 0, 0, 0, 1, 0},
{0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0},
};
const byte (*displayEmoji)[8] ;
const byte sadFaceCompact[8] = {
0b00000000,
0b00100100,
0b00100100,
0b00000000,
0b00111100,
0b01000010,
0b00000000,
0b00000000,
};
const byte *displayEmojiCompact;
void printDisplayEmoji() {
for (byte i = 0; i < 8; i++) {
Serial.write('{');
for (byte j = 0; j < 8; j++) {
Serial.print(displayEmoji[i][j]);
Serial.write((j < 7) ? ',' : '}');
}
Serial.println();
}
}
void printDisplayEmojiCompact() {
for (byte i = 0; i < 8; i++) {
Serial.write('{');
for (char j = 7; j >= 0; j--) {
Serial.print(bitRead(displayEmojiCompact[i], j));
Serial.write((j != 0) ? ',' : '}');
}
Serial.println();
}
}
void setup() {
Serial.begin(115200); Serial.println();
displayEmoji = happyFace;
printDisplayEmoji();
Serial.println();
displayEmoji = sadFace;
printDisplayEmoji();
Serial.println();
displayEmojiCompact = sadFaceCompact;
printDisplayEmojiCompact();
}
void loop() {
}