Last active
September 17, 2019 09:16
-
-
Save IsmailSan/a2e3371063647130989989a7747dc583 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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