8x8 Matrix LED [Adafruit]

So I bought a 8x8 Matrix LED [HT16K33], and I hooked it up with my Arduino, everything was cool, downloaded the needed libraries for the backpack and for the GTX.
So pretty much the backpack works with 4pins:
CLK (l2C clock)
DAT (l2C data)
GND
VCC+ (5V or 3V)

Connected everything, installed the libraries successfully. Tested it all the sketches and examples and they worked perfect.
But here comes the problem so when I started creating my own patterns for the 8x8 matrix with code i came up with errors..
Now while I was writing my code I was looking at what the original code of course so I could reference if any errors come up.

#include <Wire.h>
#include "Adafruit_LEDBackpack.h"
#include "Adafruit_GTX.h"
 
Adafruit_8x8matrix matrix = Adafruit_8x8matrix();
 
void setup()
{
   Serial.begin(9600);
   Serial.println("8x8 LED Matrix Test");
   matrix.begin(0x70);
}
 
static const uint8_t PROGMEM
   patern_bmp[] = 
   {
       B01010101,
       B00000000,
       B00000000,
       B00000000,
       B00000000,
       B00000000,
       B00000000,
       B00000000
   },
   patern2_bmp[] =
   }
       B01010101,
       B10101010,
       B00000000,
       B00000000,
       B00000000,
       B00000000,
       B00000000,
       B00000000
   },
   patern3_bmp[] =
   }
       B01010101,
       B10101010,
       B01010101,
       B00000000,
       B00000000,
       B00000000,
       B00000000,
       B00000000
   },
   patern4_bmp[] =
   }
       B01010101,
       B10101010,
       B01010101,
       B10101010,
       B00000000,
       B00000000,
       B00000000,
       B00000000
   },
   patern5_bmp[] =
   }
       B01010101,
       B10101010,
       B01010101,
       B10101010,
       B01010101,
       B00000000,
       B00000000,
       B00000000
   },
   patern6_bmp[] =
   }
       B01010101,
       B10101010,
       B01010101,
       B10101010,
       B01010101,
       B10101010,
       B00000000,
       B00000000
   },
   patern7_bmp[] =
   }
       B01010101,
       B10101010,
       B01010101,
       B10101010,
       B01010101,
       B10101010,
       B01010101,
       B00000000
   },
   patern8_bmp[] =
   }
       B01010101,
       B10101010,
       B01010101,
       B10101010,
       B01010101,
       B10101010,
       B01010101,
       B10101010
   };
 
void loop()
{
   matrix.clean();
   matrix.dawBitmap(0, 0, patern_bmp, 8, 8, LED_ON);
   matrix.writeDisplay();
   delay(500);
 
   matrix.clean();
   matrix.dawBitmap(0, 0, patern2_bmp, 8, 8, LED_ON);
   matrix.writeDisplay();
   delay(500);
 
   matrix.clean();
   matrix.dawBitmap(0, 0, patern3_bmp, 8, 8, LED_ON);
   matrix.writeDisplay();
   delay(500);
 
   matrix.clean();
   matrix.dawBitmap(0, 0, patern4_bmp, 8, 8, LED_ON);
   matrix.writeDisplay();
   delay(500);
 
   matrix.clean();
   matrix.dawBitmap(0, 0, patern5_bmp, 8, 8, LED_ON);
   matrix.writeDisplay();
   delay(500);
 
   matrix.clean();
   matrix.dawBitmap(0, 0, patern6_bmp, 8, 8, LED_ON);
   matrix.writeDisplay();
   delay(500);
 
   matrix.clean();
   matrix.dawBitmap(0, 0, patern7_bmp, 8, 8, LED_ON);
   matrix.writeDisplay();
   delay(500);
 
   matrix.clean();
   matrix.dawBitmap(0, 0, patern8_bmp, 8, 8, LED_ON);
   matrix.writeDisplay();
   delay(500);
}

For those never worked with this, so you could understand what actually the patern_bmp[] are, they are basically the 8x8 Matrix LED mapping for the LED's. 1 means ON, 0 means OFF, so am technically mapping right there how to LED's are going to switch ON and in what pattern.

Here are the errors I got:

'class Adafruit_8x8matrix' has no member named 'drawBitmap'
 
In file included from sketch_aug01a.ino:2:
C:\Users\user\Documents\Arduino\libraries\Adafruit_LEDBackpack/Adafruit_LEDBackpack.h:32:26: error: Adafruit_GFX.h: No such file or directory
sketch_aug01a.ino:3:26: error: Adafruit_GTX.h: No such file or directory
In file included from sketch_aug01a.ino:2:
C:\Users\user\Documents\Arduino\libraries\Adafruit_LEDBackpack/Adafruit_LEDBackpack.h:94: error: expected class-name before '{' token
C:\Users\user\Documents\Arduino\libraries\Adafruit_LEDBackpack/Adafruit_LEDBackpack.h:103: error: expected class-name before '{' token
sketch_aug01a.ino: In function 'void loop()':
sketch_aug01a:107: error: 'class Adafruit_8x8matrix' has no member named 'drawBitmap'
sketch_aug01a:107: error: 'neutral_bmp' was not declared in this scope
sketch_aug01a:112: error: 'class Adafruit_8x8matrix' has no member named 'drawBitmap'
sketch_aug01a:117: error: 'class Adafruit_8x8matrix' has no member named 'drawBitmap'
sketch_aug01a:122: error: 'class Adafruit_8x8matrix' has no member named 'drawBitmap'
sketch_aug01a:127: error: 'class Adafruit_8x8matrix' has no member named 'drawBitmap'
sketch_aug01a:132: error: 'class Adafruit_8x8matrix' has no member named 'drawBitmap'
sketch_aug01a:137: error: 'class Adafruit_8x8matrix' has no member named 'drawBitmap'
sketch_aug01a:142: error: 'class Adafruit_8x8matrix' has no member named 'drawBitmap'

Now what really really confuses me is that first of all that the command drawBitmap was taken from the example of the already pre-made arduino 8x8matrix sketches.
I have also double checked that i have included all the libraries needed, and came across a very interesting thing.
The PROGMEM is actually a command that stores data in flash (program) memory instead of using SRAM. The PROGMEM keyword is a variable modifier, it should be used only with the datatypes defined in pgmspace.h. It tells the compiler "put this information into flash memory", instead of into SRAM, where it would normally go.
And the PROGMEM is part of the pgmspace.h library, so that means that we need to include the library at the top your sketch #include <avr/pgmspace.h>.
I have tried doing that and nothing happen, the weird thing is that non of the presets that came with the Adafruit code/library had that library included but they all had the command static const uint8_t PROGMEM. I do not understand why would this command work in first place if the library is not included/invoked..
Shouldn't I get an error saying that static const uint8_t PROGMEM is not valid, because the library is not included??
And also why am i getting an error that there's no such directort/file as Adafruit_LEDBackpack or Adafruit_GTX.h when i have them clearly, if I did not I would not be able to even upload the given sketches in first place.

Any help or direction toward to right light is really appreciated!!

you could ask in the adafruit forum, they have there own forum.

maybe you got a reply faster

anyway, do the examples that come with the 8x8 still run?

otherwise maybe you have a library conflict

matrix.dawBitmap(0, 0, patern_bmp, 8, 8, LED_ON);

or

matrix.drawBitmap(0, 0, patern_bmp, 8, 8, LED_ON);

Ronwl:
you could ask in the adafruit forum, they have there own forum.
maybe you got a reply faster, anyway, do the examples that come with the 8x8 still run?
otherwise maybe you have a library conflict

Yup they still run and function properly.

BulldogLowell:

matrix.dawBitmap(0, 0, patern_bmp, 8, 8, LED_ON);

or

matrix.drawBitmap(0, 0, patern_bmp, 8, 8, LED_ON);

It's drawBitmap

Ok, after a lot of trial and error I finally found where the bug was.
It seems to me that those Adafruit libraries were not correctly included on my sketch.
In addition to downloading and installing the library onto the Arduino library directory (on Windows, that's normally C:\Users\UserName\Documents\Arduino\libraries), when you want to use that library with Arduino IDE, you must add the library for your sketch with the menu command "Sketch -> Import Library..."
Important note: it seems that just adding #include "library.h" does not work with Arduino IDE, you absolutely need to use the menu, or just type it out correctly.

I had written:
#include "Adafruit_LEDBackpack.h"
#include "Adafruit_GTX.h"

When I really needed to just import them from the "Sketch -> Import Library..." and they would look like this:
#include <Adafruit_LEDBackpack.h>
#include <Adafruit_GTX.h>

But it still leaves me with one unsolved question of how does the static const uints8_t PROGMEM work without including the #include <avr/pgmspace.h> library. If anyone knows why, I'd appreciate if they could explain it, it would really shine some light on how this pattern creating works!

But it still leaves me with one unsolved question of how does the static const uints8_t PROGMEM work without including the #include <avr/pgmspace.h> library. If anyone knows why, I'd appreciate if they could explain it, it would really shine some light on how this pattern creating works!

The IDE adds to your code. One of the things it adds is a #include statement to include Arduino.h, which contains:

#ifndef Arduino_h
#define Arduino_h

#include <stdlib.h>
#include <string.h>
#include <math.h>

#include <avr/pgmspace.h>
#include <avr/io.h>
#include <avr/interrupt.h>

#include "binary.h"

@PaulS to technically those libraries you listed there are "automatically" included?

@PaulS to technically those libraries you listed there are "automatically" included?

You can, you know, look at the source code that is generated by the IDE before the compiler is invoked, to see what is actually done. I recommend that you do that at least once.