Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in Matrix 16x8 code and includes #198

Open
Bredin76 opened this issue Apr 7, 2024 · 1 comment
Open

Bug in Matrix 16x8 code and includes #198

Bredin76 opened this issue Apr 7, 2024 · 1 comment

Comments

@Bredin76
Copy link

Bredin76 commented Apr 7, 2024

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 ?

@NeftaliVenancio
Copy link
Contributor

Hola, podrias ser un poco más especifico con tu problema.

Estoy revisando el funcionamiento con el ejemplo que estas mencionando en la versión web

Captura de pantalla 2024-04-11 a la(s) 4 21 21 p m

y al revisar el código de Arduino sí se ejecutan los cambios de imagen que se indican en el bloque

Captura de pantalla 2024-04-11 a la(s) 4 22 16 p m

Prueba 2:

Captura de pantalla 2024-04-11 a la(s) 4 22 45 p m Captura de pantalla 2024-04-11 a la(s) 4 23 08 p m

Si puedes compartir más detalles sobre el problema que tienes tal vez pueda replicar las condiciones exactas e intentar encontrar el problema que mencionas.

Saludos @Bredin76

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants