Skip to content

Bug in Matrix 16x8 code and includes  #198

@Bredin76

Description

@Bredin76

Hi,

Fully newbie in OTTO DIY with my 6YO son,
Trying to use 16x8 I2C MAtrix LED, which work with ESP8266 board but i'm having trouble with MAtrix led Blocks

For instance when i try to do this
image

the code looks like this

#include <Wire.h>
#include "Adafruit_LEDBackpack.h"
Adafruit_8x16matrix ematrix = Adafruit_8x16matrix();

static const uint8_t PROGMEM
eyes1_bmp[] = {  B00000000,B00111100,B01000010,B01001010,B01000010,B01000010,B00111100,B00000000,B00000000,B00111100,B01000010,B01001010,B01000010,B01000010,B00111100,B00000000},
eyes2_bmp[] = {  B00111110,B01111111,B01111111,B01100011,B01100011,B01100011,B00111110,B00000000,B00111110,B01111111,B01111111,B01100011,B01100011,B01100011,B00111110,B00000000},
happy1_bmp[] = {  B00000000,B00111100,B00000010,B00000010,B00000010,B00000010,B00111100,B00000000,B00000000,B00111100,B00000010,B00000010,B00000010,B00000010,B00111100,B00000000},
happy2_bmp[] = {  B00000000,B01111100,B01111110,B00000110,B00000110,B01111110,B01111100,B00000000,B00000000,B01111100,B01111110,B00000110,B00000110,B01111110,B01111100,B00000000},
happy3_bmp[] = {  B00000000,B01111000,B01111100,B00001110,B00001110,B01111100,B01111000, B00000000,B00000000,B01111000,B01111100,B00001110,B00001110,B01111100,B01111000, B00000000},
happy4_bmp[] =  {  B00000000,B01110000,B01111000,B00011000,B00011000,B01111000,B01110000,B00000000,B00000000,B01110000,B01111000,B00011000,B00011000,B01111000,B01110000,B00000000},
sad1_bmp[] =  {  B00000000,B00111000,B01111000,B01100000,B01100000,B01111000,B00111000,B00000000,B00000000,B00111000,B01111000,B01100000,B01100000,B01111000,B00111000,B00000000},
sad2_bmp[] =  {  B00000000,B00111110,B01111110,B01100000,B01100000,B01111110,B00111110,B00000000,B00000000,B00111110,B01111110,B01100000,B01100000,B01111110,B00111110,B00000000,},
sad3_bmp[] =  {  B00000000,B00011000,B00011000,B00011000,B00011000,B00011000,B00011000,B00000000,B00000000,B00011000,B00011000,B00011000,B00011000,B00011000,B00011000,B00000000},
angry1_bmp[] = {  B00000000,B00011110,B00111100,B01111000,B01110000,B00100000,B00000000,B00000000,B00000000,B00000000,B00100000,B01110000,B01111000,B00111100,B00011110,B00000000},
angry2_bmp[] = {  B00000000,B00011111,B00111110,B01111100,B11111000,B11110000,B01100000,B00000000,B00000000,B01100000,B11110000, B11111000,B01111100,B00111110,B00011111,B00000000},
love1_bmp[] = {  B00000000,B00001100,B00011110,B00111100,B00111100,B00011110,B00001100,B00000000,B00000000,B00001100,B00011110,B00111100,B00111100,B00011110,B00001100,B00000000},
love2_bmp[] = {  B00001100,B00011110,B00111110,B01111100,B00111110,B00011110,B00001100,B00000000,B00000000,B00001100,B00011110,B00111110,B01111100,B00111110,B00011110,B00001100},
sleep1_bmp[] = {  B00000000,B00100010,B00110010,B00101010,B00100110,B00100010,B00000000,B00000000,B00000000,B00000000,B00100010,B00110010,B00101010,B00100110,B00100010,B00000000},
sleep2_bmp[] = {  B00000000,B01000010,B01100010,B01110010,B01011010,B01001110,B01000110,B00000000,B00000000,B01000010,B01100010,B01110010,B01011010,B01001110,B01000110,B00000000},
confused_bmp[] = {  B00000000,B01111100,B10000010,B10111010,B10101010,B10001010,B01111000,B00000000,B00000000,B01111100,B10000010,B10111010,B10101010,B10001010,B01111000,B00000000},
dizzy1_bmp[] = {  B00000000,B01110000,B00111000,B00011100,B00111000,B01110000,B00111000,B00000000,B00000000,B01110000,B00111000,B00011100,B00111000,B01110000,B00111000,B00000000},
dizzy2_bmp[] = {  B00000000,B00011100,B00111000,B01110000,B00111000,B00011100,B00111000,B00000000,B00000000,B00011100,B00111000,B01110000,B00111000,B00011100,B00111000,B00000000},
wave1_bmp[] = {  B00011100,B00111000,B01110000,B00111000,B00011100,B00111000,B01110000,B00000000,B00000000,B00011100,B00111000,B01110000,B00111000,B00011100,B00111000,B01110000},
wave2_bmp[] = {  B00111000,B00111000,B00111000,B00111000,B00111000,B00111000,B00111000,B00000000,B00000000, B00111000,B00111000,B00111000,B00111000,B00111000,B00111000,B00111000},
wave3_bmp[] = {  B01110000,B00111000,B00011100,B00111000,B01110000,B00111000,B00011100,B00000000, B00000000,B01110000,B00111000,B00011100,B00111000,B01110000,B00111000,B00011100,},
magic1_bmp[] = {  B00000000,B00000000,B01111110,B11111111,B01111110,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01111110,B11111111,B01111110,B00000000,B00000000},
magic2_bmp[] = {  B00000000,B01111110,B11111111,B01111110,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01111110,B11111111,B01111110,B00000000,B00000000,B00000000},
magic3_bmp[] = {  B00000000,B00000000,B00000000,B01111110,B11111111,B01111110,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01111110,B11111111,B01111110,B00000000},
fail_bmp[] = {  B11100000,B01110000,B00111000,B00011100,B00001110,B00000111,B00000000,B00000000,B00000000,B00000000,B00000111,B00001110,B00011100,B00111000,B01110000,B11100000},
fretful1_bmp[] = {  B00000000,B00110000,B01111000,B01111000,B01111100,B00111100,B00001000,B00000000,B00000000,B00001000,B00111100,B01111100,B01111000,B01111000,B00110000,B00000000},
fretful2_bmp[] = {  B00000000,B00111000,B00111000,B00111100,B00011110,B00001110,B00001110,B00000000,B00000000,B00001110,B00001110,B00111110,B00111100,B00111000,B00111000,B00000000},
fretful3_bmp[] = {  B00000000,B00110000,B00111000,B00111100,B00111110,B00011110,B00001110,B00000000,B00000000,B00001110,B00011110,B00111110,B00111100,B00111000,B00110000,B00000000,},
xx_bmp[] =  {  B00000000,B00100010,B00010100,B00001000,B00010100,B00100010,B00000000,B00000000,B00000000,B00000000,B00100010,B00010100,B00001000,B00010100,B00100010,B00000000},
XX_bmp[] = {  B01000001,B00100010,B00010100,B00001000,B00010100,B00100010,B01000001,B00000000,B00000000,B01000001,B00100010,B00010100,B00001000,B00010100,B00100010,B01000001},
full_bmp[] =  {   B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111 };

void setup() {
  ematrix.begin(0x70);  // pass in the address

    ematrix.clear();
  ematrix.clear();
  ematrix.drawBitmap(0, 0, + happy_bmp , 8, 16, 1);
  ematrix.writeDisplay();

}

void loop() {

}

even if i call eyes happy1 - the code call happy_bmp which is not declare.
It's the same thing with a lot of eyes expressions.
I had to force a lot of code in order to have Matrix Led example working.
I think there is something to do in blocks but i dont know how to help...

Can you help me ? AmI missing something ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions