Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_IS31FL3731.h>
Adafruit_IS31FL3731 matrix = Adafruit_IS31FL3731();
static const uint8_t PROGMEM
triangle[] =
{ B00000000,
B00010000,
B00101000,
B01000100,
B11111110,
B00000000,
B00000000,
B00000000
},
square[] =
{ B00000000,
B00000000,
B01111110,
B01000010,
B01000010,
B01111110,
B00000000,
B00000000
};
void setup() {
Serial.begin(9600);
if (! matrix.begin()) {
Serial.println("IS31 not found");
while (1);
}
Serial.println("IS31 Found!");
}
void loop() {
matrix.setRotation(0);
matrix.clear();
matrix.drawBitmap(0, 0, triangle, 7, 7, 255);
delay(500);
matrix.clear();
matrix.drawBitmap(0, 0, square, 7, 7, 255);
delay(500);
matrix.clear();
matrix.drawCircle(3, 3, 3, 255);
matrix.drawCircle(3, 3, 3, 255);
delay(500);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment