Again a simple question for you. I have tried to show a simple animation with 31 frames on a 8x8 LED matrix with a I2C backpack. I am a little bit confused about the code. I did not find any good guide for calling up functions like this except the tutorial for the https://learn.adafruit.com/trinket-slas ... ource-code. I have edited the code a little bit to make it work on an arduino uno. But I really don´t know what the reorder section is for. As you can see, I am a rookie in this. Am I to stupid for this or is it normal to have such problems in understanding the code?
What I am trying to do consists of this:
Code: Select all
#define BRIGHTNESS 10 // 0=min, 15=max
#define I2C_ADDR 0x70 // Edit if backpack A0/A1 jumpers set
#define REPS 3 // Number of times to repeat the animation loop (1-105)
#include <Adafruit_LEDBackpack.h>
#include <Wire.h>
#include <Adafruit_GFX.h>
const uint8_t PROGMEM anim[][8] = {
B11111111, B00011000, B00011000, B00011000, B00011000, B00011000, B00011000, B11111111,10, // 1
B11111111, B11111111, B00111100, B00111100, B00111100, B00111100, B11111111, B11111111,10, // 2
B11111111, B11111111, B11111111, B01111110, B01111110, B11111111, B11111111, B11111111,10 , // 3
B11111111, B11111111, B11111111, B11111111, B11111111, B11111111, B11111111, B11111111,10 , // 4
B00000000, B11100111, B11100111, B11100111, B11100111, B11100111, B11100111, B00000000,10 , // 5
B00000000, B00000000, B11000011, B11000011, B11000011, B11000011, B00000000, B00000000,10 ,// 6
B00000000, B00000000, B00000000, B10000001, B10000001, B00000000, B00000000, B00000000,10 , // 7
B00000000, B00000000, B00000000, B00000000, B00000000, B00000000, B00000000, B00000000,10 ,// 8
B00011000, B00000000, B00000000, B00000000, B00000000, B00000000, B00000000, B00000000,10 ,// 9
B00111000, B00001000, B00000000, B00000000, B00000000, B00000000, B00000000, B00000000,10 ,// 10
B01111000, B00001000, B00001000, B00000000, B00000000, B00000000, B00000000, B00000000,10 ,// 11
B11111000, B00001000, B00001000, B00001000, B00000000, B00000000, B00000000, B00000000,10 ,// 12
B11111001, B00001000, B00001000, B00001000, B00001000, B00000000, B00000000, B00000000,10 ,// 13
B11111011, B00001000, B00001000, B00001000, B00001000, B00001000, B00000000, B00000000,10 ,// 14
B11111111, B00001000, B00001000, B00001000, B00001000, B00001000, B00001000, B00000000,10 ,// 15
B11111111, B00001000, B00001000, B00001000, B00001000, B00001000, B00001000, B00001000,10 ,// 16
B00000100, B11111111, B00000100, B00000100, B00000100, B00000100, B00000100, B00000100,10 ,// 17
B00000010, B00000010, B11111111, B00000010, B00000010, B00000010, B00000010, B00000010,10 , // 18
B00000001, B00000001, B00000001, B11111111, B00000001, B00000001, B00000001, B00000001,10 , // 19
B10000000, B10000000, B10000000, B10000000, B11111111, B10000000, B10000000, B10000000,10 , // 20
B01000000, B01000000, B01000000, B01000000, B01000000, B11111111, B01000000, B01000000,10 , // 21
B00100000, B00100000, B00100000, B00100000, B00100000, B00100000, B11111111, B00100000,10 ,// 22
B00010000, B00010000, B00010000, B00010000, B00010000, B00010000, B00010000, B11111111,10 , // 23
B00010000, B00010000, B00010000, B00010000, B00010000, B00010000, B11111111, B00010000,10 , // 24
B00010000, B00010000, B00010000, B00010000, B00010000, B11111111, B00010000, B00010000,10 ,// 10
B00010000, B00010000, B00010000, B00010000, B11111111, B00010000, B00010000, B00010000,10 , // 26
B00010000, B00010000, B00010000, B11111111, B00010000, B00010000, B00010000, B00010000,10 , // 27
B00010000, B00010000, B11111111, B00010000, B00010000, B00010000, B00010000, B00010000,10 ,// 28
B00010000, B11111111, B00010000, B00010000, B00010000, B00010000, B00010000, B00010000,10 ,// 29
B11111111, B00010000, B00010000, B00010000, B00010000, B00010000, B00010000, B00010000,10 , // 30
B00100000, B11111111, B00100000, B00100000, B00100000, B00100000, B00100000, B00100000,10 , // 31
};
Thank you guys!