Skip to content

Instantly share code, notes, and snippets.

@IsmailSan
Last active September 17, 2019 09:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save IsmailSan/a2e3371063647130989989a7747dc583 to your computer and use it in GitHub Desktop.
Save IsmailSan/a2e3371063647130989989a7747dc583 to your computer and use it in GitHub Desktop.
#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