#include <Wire.h>
#include "Adafruit_LEDBackpack.h"
#include "Adafruit_GFX.h"
#ifndef _BV
#define _BV(bit) (1<<(bit))
#endif
Adafruit_LEDBackpack matrix = Adafruit_LEDBackpack();
uint8_t counter = 0;
void setup() {
Serial.begin(9600);
Serial.println("HT16K33 test");
Wire.begin(21, 22);
matrix.begin(0x70); // pass in the address
}
void loop() {
// paint one LED per row. The HT16K33 internal memory looks like
// a 8x16 bit matrix (8 rows, 16 columns)
// for (uint8_t i=0; i<8; i++) {
// // draw a diagonal row of pixels
// matrix.displaybuffer[i] = _BV((counter+i) % 16) | _BV((counter+i+8) % 16) ;
// }
//uint16_t test1[8] = {1,1,1,0,1,1,0,0};
for (int i=0; i <8; i++)
matrix.displaybuffer[i] = 0b00110011;
// write the changes we just made to the display
matrix.writeDisplay();
delay(100);
// counter++;
// if (counter >= 16) counter = 0;
}